forked from jeffctown/XcodeReleasesApi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (20 loc) · 818 Bytes
/
Dockerfile
File metadata and controls
21 lines (20 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Compile Image
FROM swift:5.1.1 as builder
RUN apt-get -qq update && apt-get install -y libssl-dev zlib1g-dev \
&& rm -r /var/lib/apt/lists/*
WORKDIR /app
COPY . .
RUN mkdir -p /build/lib && cp -R /usr/lib/swift/linux/*.so* /build/lib
RUN swift build -c release
RUN mv `swift build -c release --show-bin-path` /build/bin
# Production image
FROM ubuntu:18.04
# DEBIAN_FRONTEND=noninteractive for automatic UTC configuration in tzdata
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
libatomic1 libicu60 libxml2 libcurl4 libz-dev libbsd0 tzdata curl \
&& rm -r /var/lib/apt/lists/*
WORKDIR /app
RUN mkdir -p /var/lib/xcodereleases/data
COPY --from=builder /build/bin/Run .
COPY --from=builder /build/lib/* /usr/lib/
ENTRYPOINT ./Run serve --env "prod" --hostname 0.0.0.0 --port 8080