-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (24 loc) · 904 Bytes
/
Dockerfile
File metadata and controls
24 lines (24 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM swift:5.4
ARG GITHUB_SHA
RUN apt-get update && apt-get install -y libssl-dev zlib1g-dev unzip aapt && apt-get -qqy purge apport && rm -rf /var/lib/apt/lists/*
WORKDIR /BUILD
ADD . ./
RUN export hash=${GITHUB_SHA} && echo let MDT_GitCommit = \""${hash}\"" > ./Sources/App/gitCommit.swift
RUN cat ./Sources/App/gitCommit.swift
RUN swift package clean
RUN swift package resolve
RUN swift build -c release --product Run
RUN mkdir -p /app/bin
ADD ./Sources/App/Config/envs/production/configDockerFull.json /app/config/config.json
ADD Public /app/Public/
RUN ls -lhR /app/
RUN mv `swift build -c release --product Run --show-bin-path`/Run /app/bin/
EXPOSE 8080
RUN ls /app/bin/Run
RUN ls /app/config/config.json
WORKDIR /app
RUN rm -fr /BUILD
RUN ls -lh /app/bin/
RUN ls -lh /app/
ENTRYPOINT ["/app/bin/Run", "serve", "-e", "production", "-b", "0.0.0.0"]
#CMD /app/bin/Run serve -e production -b 0.0.0.0