d-webservice-example/Dockerfile

24 lines
612 B
Text
Raw Permalink Normal View History

2018-12-18 23:36:48 +01:00
FROM dlang2/dmd-ubuntu:2.083.1 as build
WORKDIR /dlang/d-webservice-example
COPY . .
RUN dub build --build=release
FROM ubuntu:17.10
EXPOSE 8080
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/d-webservice-example/d-webservice-example /dlang/d-webservice-example/d-webservice-example
RUN useradd --user-group --create-home --shell /bin/false app && \
chown -R app:app /dlang/d-webservice-example
USER app
2018-12-19 00:49:34 +01:00
CMD ["/dlang/d-webservice-example/d-webservice-example"]