2018-11-29 00:51:18 +01:00
|
|
|
FROM dlang2/dmd-ubuntu:2.083.0 as build
|
2018-11-27 10:03:22 +01:00
|
|
|
WORKDIR /dlang/vibe-docker
|
|
|
|
COPY . .
|
|
|
|
|
2018-11-29 00:51:18 +01:00
|
|
|
RUN useradd --user-group --create-home --shell /bin/false app && \
|
|
|
|
chown -R app:app /dlang/vibe-docker
|
2018-11-27 20:31:20 +01:00
|
|
|
USER app
|
|
|
|
|
2018-11-29 00:51:18 +01:00
|
|
|
RUN dub build --build=release
|
|
|
|
|
|
|
|
FROM ubuntu:17.10
|
|
|
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
|
|
|
RUN set -ex && \
|
|
|
|
apt-get update && \
|
|
|
|
apt-get install --no-install-recommends -y \
|
|
|
|
ca-certificates \
|
|
|
|
libssl1.0.0
|
|
|
|
|
|
|
|
COPY --from=build /dlang/vibe-docker/vibe-docker /dlang/vibe-docker/vibe-docker
|
|
|
|
|
|
|
|
RUN useradd --user-group --create-home --shell /bin/false app && \
|
|
|
|
chown -R app:app /dlang/vibe-docker
|
|
|
|
USER app
|
2018-11-27 10:03:22 +01:00
|
|
|
|
|
|
|
EXPOSE 8080
|
|
|
|
|
|
|
|
CMD ["/dlang/vibe-docker/vibe-docker"]
|