forked from 123FLO321/SwiftTileserverCache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (28 loc) · 886 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# ================================
# Build image
# ================================
FROM swift:5.2 as build
WORKDIR /build
# Copy required folders into container
COPY Sources Sources
COPY Tests Tests
COPY Resources Resources
COPY Package.swift Package.swift
# Compile with optimizations
RUN swift build \
--enable-test-discovery \
-c release \
-Xswiftc -g
# ================================
# Run image
# ================================
FROM swift:5.2
WORKDIR /SwiftTileserverCache
# Install imagemagick
RUN apt-get -y update && apt-get install -y imagemagick
# Copy build artifacts
COPY --from=build /build/.build/release /SwiftTileserverCache
# Copy Resources
COPY --from=build /build/Resources /SwiftTileserverCache/Resources
ENTRYPOINT ["./SwiftTileserverCacheApp"]
CMD ["serve", "--env", "production", "--log", "info", "--hostname", "0.0.0.0", "--port", "9000"]