Files
swift-mqtt-dewpoint/docker/Dockerfile
Michael Housh 5e998a60d0
Some checks failed
CI / Run Tests (push) Failing after 13s
feat: Minimal readme and cleans up docker files.
2024-11-14 22:12:20 -05:00

15 lines
374 B
Docker
Executable File

# Used this to build the release version of the image.
# Build the executable
FROM swift:5.10 AS build
WORKDIR /build
COPY ./Package.* ./
RUN swift package resolve
COPY . .
RUN swift build -c release -Xswiftc -g
# Run image
FROM swift:5.10-slim
WORKDIR /run
COPY --from=build /build/.build/release/dewpoint-controller /run
CMD ["/bin/bash", "-xc", "./dewpoint-controller"]