moq-rs/cert/Dockerfile

22 lines
431 B
Docker
Raw Normal View History

2023-05-16 17:23:50 +00:00
# Use ubuntu because it's ez
FROM ubuntu:latest
WORKDIR /build
2023-05-16 17:23:50 +00:00
# Use openssl and golang to generate certificates
RUN apt-get update && \
apt-get install -y ca-certificates openssl golang xxd
2023-05-16 17:23:50 +00:00
# Download the go modules
COPY go.mod go.sum ./
RUN go mod download
# Copy over the remaining files.
COPY . .
# Save the certificates to a volume
VOLUME /cert
2023-05-16 17:23:50 +00:00
# TODO support an output directory
CMD ./generate && cp localhost.* /cert