feat: Begins adding docker containers
This commit is contained in:
23
docker/Dockerfile
Executable file
23
docker/Dockerfile
Executable file
@@ -0,0 +1,23 @@
|
||||
# Used this to build the release version of the image.
|
||||
# Build the executable
|
||||
ARG SWIFT_IMAGE_VERSION="6.0.3"
|
||||
|
||||
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
|
||||
|
||||
RUN export DEBIAN_FRONTEND=nointeractive DEBCONF_NOINTERACTIVE_SEEN=true && apt-get -q update && \
|
||||
apt-get -q install -y \
|
||||
ansible \
|
||||
pandoc \
|
||||
texlive \
|
||||
&& rm -r /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=build /build/.build/release/hpa /usr/local/bin
|
||||
CMD ["/bin/bash", "-xc", "/usr/local/bin/hpa"]
|
||||
10
docker/Dockerfile.test
Normal file
10
docker/Dockerfile.test
Normal file
@@ -0,0 +1,10 @@
|
||||
# Used to build a test image.
|
||||
ARG SWIFT_IMAGE_VERSION="6.0.3"
|
||||
FROM swift:${SWIFT_IMAGE_VERSION}
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./Package.* ./
|
||||
RUN swift package resolve
|
||||
COPY . .
|
||||
RUN swift build
|
||||
CMD ["/bin/bash", "-xc", "swift", "test"]
|
||||
Reference in New Issue
Block a user