raashi_me

raashi_me

This is how my Dockerfile looks like

FROM elixir:1.10.4-alpine AS build

ARG CIRCLE_BUILD_NUM
ENV CIRCLE_BUILD_NUM=$CIRCLE_BUILD_NUM

ENV MIX_ENV=prod \
  LANG=C.UTF-8

RUN mix local.hex --force && \
    mix local.rebar --force

# Create the application build directory
RUN mkdir /apps
COPY . /apps
WORKDIR /apps/

COPY mix.exs mix.lock ./
COPY config config
RUN mix deps.get
RUN mix deps.compile

#releases
RUN MIX_ENV=prod mix release my_app

FROM alpine:3.12 as apps
WORKDIR /apps

RUN apk add --no-cache libressl ncurses-libs

RUN mkdir -p /apps/my_app

# create a new user
RUN addgroup -S elixir_app && adduser -S elixir_app -G elixir_app
RUN chown elixir_app:elixir_app /apps
USER elixir_app

COPY --from=build --chown=elixir_app:elixir_app /apps/_build/prod/rel/my_app /apps/my_app

And this is my docker-compose file

version: '3.2'

networks:
  net:

services:
  my_app:
   container_name: my_app
    image: "my_app/myapp-${CIRCLE_BUILD_NUM}"
    environment:
     ----------------------
    expose:
      - "${PORT}"
    ports:
      - "${PORT}:${PORT}"
    command: /apps/my_app/bin/my_app start

When I run docker-compose -f docker-compose.yml up -dI get

Starting my_app_1 … done

But When I run

docker exec -it my_app  /apps/my_app/bin/my_app eval "MyApp.Release.migrate"

getting

Error response from daemon: Container e91f88998632481a657d5c66eafaf4f970a4e3203aac129c46d194f31bcdab63 is not running

Can anyone help me with this?

Showing Posts 1 to 3

NobbZ

NobbZ

Your container is missing an ENTRYPOINT.

NobbZ

NobbZ

Try starting the compose without -d to not have it vanish in the background, read the error messages that the container prints before dying.

NobbZ

NobbZ

Elixir 1.10 is based on alpine 3.13, you probably need to adjust your alpine version in the apps stage.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews