improve Dockerfile for caching
This commit is contained in:
parent
36ba1da022
commit
6f4ac1a3cc
1 changed files with 1 additions and 7 deletions
|
@ -2,14 +2,10 @@ FROM dlang2/dmd-ubuntu:2.083.0 as build
|
||||||
WORKDIR /dlang/vibe-docker
|
WORKDIR /dlang/vibe-docker
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN useradd --user-group --create-home --shell /bin/false app && \
|
|
||||||
chown -R app:app /dlang/vibe-docker
|
|
||||||
USER app
|
|
||||||
|
|
||||||
RUN dub build --build=release
|
RUN dub build --build=release
|
||||||
|
|
||||||
FROM ubuntu:17.10
|
FROM ubuntu:17.10
|
||||||
|
EXPOSE 8080
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN set -ex && \
|
RUN set -ex && \
|
||||||
|
@ -24,6 +20,4 @@ RUN useradd --user-group --create-home --shell /bin/false app && \
|
||||||
chown -R app:app /dlang/vibe-docker
|
chown -R app:app /dlang/vibe-docker
|
||||||
USER app
|
USER app
|
||||||
|
|
||||||
EXPOSE 8080
|
|
||||||
|
|
||||||
CMD ["/dlang/vibe-docker/vibe-docker"]
|
CMD ["/dlang/vibe-docker/vibe-docker"]
|
||||||
|
|
Loading…
Reference in a new issue