简体   繁体   中英

Docker Elixir mix 'command not found'

Trying to set up docker with a new Phoenix/Elixir app. I've shared the Dockerfile I'm using below.

When I run docker-compose up with this Dockerfile, I get errors that say "mix does not exist".

I'm working from this link. https://medium.com/@hex337/running-a-phoenix-1-3-project-with-docker-compose-d82ab55e43cf

Thanks!

# Elixir + Phoenix

FROM elixir:1.6.1
FROM node:8.2

# Install debian packages
RUN apt-get update
RUN apt-get install --yes build-essential inotify-tools postgresql-client

# Install Phoenix packages

RUN mix local.hex --force
RUN mix local.rebar --force
RUN mix archive.install --force https://github.com/phoenixframework/archives/raw/master/phx_new.ez


WORKDIR /app
EXPOSE 4000

You're having multiple FROM . And the latest one FROM node:8.2 is the one being used. Simply remove it.

Otherwise, if you put it there with purpose - you need to explain why.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM