feat: Using slim image to cut down on size of docker container application

This commit is contained in:
2024-11-05 12:11:31 -05:00
parent d675ac2e39
commit fb9b41a8be
2 changed files with 4 additions and 3 deletions

View File

@@ -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"]

View File

@@ -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