improve Dockerfile for caching

This commit is contained in:
Johannes Loher 2018-11-29 01:29:21 +01:00
parent 36ba1da022
commit 6f4ac1a3cc

View file

@ -2,14 +2,10 @@ FROM dlang2/dmd-ubuntu:2.083.0 as build
WORKDIR /dlang/vibe-docker
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
FROM ubuntu:17.10
EXPOSE 8080
ENV DEBIAN_FRONTEND=noninteractive
RUN set -ex && \
@ -24,6 +20,4 @@ RUN useradd --user-group --create-home --shell /bin/false app && \
chown -R app:app /dlang/vibe-docker
USER app
EXPOSE 8080
CMD ["/dlang/vibe-docker/vibe-docker"]