Optimize Dockerfile
Just merging RUNs to decrease the number of layers
This commit is contained in:
parent
4a418698db
commit
c86db959cb
1 changed files with 4 additions and 6 deletions
10
Dockerfile
10
Dockerfile
|
@ -7,9 +7,8 @@ ENV MIX_ENV=prod
|
||||||
RUN apk add git gcc g++ musl-dev make &&\
|
RUN apk add git gcc g++ musl-dev make &&\
|
||||||
echo "import Mix.Config" > config/prod.secret.exs &&\
|
echo "import Mix.Config" > config/prod.secret.exs &&\
|
||||||
mix local.hex --force &&\
|
mix local.hex --force &&\
|
||||||
mix local.rebar --force
|
mix local.rebar --force &&\
|
||||||
|
mix deps.get --only prod &&\
|
||||||
RUN mix deps.get --only prod &&\
|
|
||||||
mkdir release &&\
|
mkdir release &&\
|
||||||
mix release --path release
|
mix release --path release
|
||||||
|
|
||||||
|
@ -20,9 +19,8 @@ ARG DATA=/var/lib/pleroma
|
||||||
|
|
||||||
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
|
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
|
||||||
apk update &&\
|
apk update &&\
|
||||||
apk add ncurses postgresql-client
|
apk add ncurses postgresql-client &&\
|
||||||
|
adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
||||||
RUN adduser --system --shell /bin/false --home ${HOME} pleroma &&\
|
|
||||||
mkdir -p ${DATA}/uploads &&\
|
mkdir -p ${DATA}/uploads &&\
|
||||||
mkdir -p ${DATA}/static &&\
|
mkdir -p ${DATA}/static &&\
|
||||||
chown -R pleroma ${DATA} &&\
|
chown -R pleroma ${DATA} &&\
|
||||||
|
|
Loading…
Reference in a new issue