16 lines
456 B
Docker
Executable File
16 lines
456 B
Docker
Executable File
# Used this to build the release version of the image.
|
|
# Build the executable
|
|
ARG SWIFT_IMAGE_VERSION="5.10"
|
|
|
|
FROM swift:${SWIFT_IMAGE_VERSION} AS build
|
|
WORKDIR /build
|
|
COPY ./Package.* ./
|
|
RUN swift package resolve
|
|
COPY . .
|
|
RUN swift build -c release -Xswiftc -g
|
|
|
|
# Run image
|
|
FROM swift:${SWIFT_IMAGE_VERSION}-slim
|
|
COPY --from=build /build/.build/release/dewpoint-controller /usr/local/bin
|
|
CMD ["/bin/bash", "-xc", "/usr/local/bin/dewpoint-controller run"]
|