2021-01-04 08:11:23 +01:00
|
|
|
FROM golang:alpine AS builder
|
|
|
|
|
|
|
|
COPY cacert-gosigner /src/
|
|
|
|
|
|
|
|
RUN set -ex ; \
|
2021-01-04 20:40:51 +01:00
|
|
|
cd /src/cmd/signer ; \
|
|
|
|
CGO_ENABLED=0 go build .
|
2021-01-04 08:11:23 +01:00
|
|
|
|
2021-01-04 20:40:51 +01:00
|
|
|
# need to use Debian because we need xdelta 1.x to support signer protocol
|
|
|
|
# version 1
|
|
|
|
FROM debian:buster-slim
|
2021-01-04 08:11:23 +01:00
|
|
|
|
2021-01-04 20:40:51 +01:00
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
socat \
|
|
|
|
xdelta \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
COPY --from=builder /src/cmd/signer/signer /app/
|
2021-01-04 08:11:23 +01:00
|
|
|
|
|
|
|
COPY docker/run-gosigner usr/local/bin/
|
|
|
|
COPY docker/signer-config/* /srv/caconfig/
|
|
|
|
COPY testca /srv/testca/
|
|
|
|
|
|
|
|
VOLUME /srv/ca
|
|
|
|
|
|
|
|
ENTRYPOINT []
|
|
|
|
CMD ["/usr/local/bin/run-gosigner"]
|