raashi_me
Container not running error for docker exec command
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?
First Post!
NobbZ
Your container is missing an ENTRYPOINT.
Popular in Questions
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it.
I’m very interested in Elixir,...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
To simplify some tasks at work, I wrote and published this package yesterday. It’s a simple macro that enables Access behaviour on struct...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
Other popular topics
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
Hello, I get Persian date from my client and convert it to normal calendar like this:
def jalali_string_to_miladi_english_number(persi...
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
Hello!
Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
After calling mix ecto.create I get this error:
17:00:32.162 [error] GenServer #PID<0.412.0> terminating
** (Postgrex.Error) FATAL...
New
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New








