feat: Using slim image to cut down on size of docker container application
This commit is contained in:
@@ -8,6 +8,7 @@ COPY . .
|
||||
RUN swift build --enable-test-discovery -c release -Xswiftc -g
|
||||
|
||||
# Run image
|
||||
FROM swift:5.10
|
||||
FROM swift:5.10-slim
|
||||
WORKDIR /run
|
||||
COPY --from=build /build/.build/release /run
|
||||
COPY --from=build /build/.build/release/dewPoint-controller /run
|
||||
CMD ["/bin/bash", "-xc", "./dewPoint-controller"]
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
services:
|
||||
server:
|
||||
image: swift-mqtt-dewpoint:latest
|
||||
restart: unless-stopped
|
||||
env_file: .env
|
||||
command: /bin/bash -xc "./dewPoint-controller"
|
||||
|
||||
test:
|
||||
image: swift:latest
|
||||
|
||||
Reference in New Issue
Block a user