mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
4842d29aff
* Deploy activation service on cluster init * Use base image with CA certificates for activation service * Improve KMS server Signed-off-by: Daniel Weiße <dw@edgeless.systems>
31 lines
983 B
Docker
31 lines
983 B
Docker
FROM ubuntu@sha256:7cc0576c7c0ec2384de5cbf245f41567e922aab1b075f3e8ad565f508032df17 as build
|
|
|
|
ENV DEBIAN_FRONTEND="noninteractive"
|
|
RUN apt-get update && apt-get install wget git -y
|
|
|
|
# Install Go
|
|
ARG GO_VER=1.18
|
|
RUN wget https://go.dev/dl/go${GO_VER}.linux-amd64.tar.gz
|
|
RUN tar -C /usr/local -xzf go${GO_VER}.linux-amd64.tar.gz && rm go${GO_VER}.linux-amd64.tar.gz
|
|
ENV PATH ${PATH}:/usr/local/go/bin
|
|
|
|
# Download go dependencies
|
|
WORKDIR /constellation/
|
|
COPY go.mod ./
|
|
COPY go.sum ./
|
|
RUN go mod download all
|
|
|
|
# Copy Repo
|
|
COPY . /constellation
|
|
RUN rm -rf ./hack/
|
|
|
|
# Build
|
|
RUN mkdir -p /constellation/build
|
|
WORKDIR /constellation/kms/server/cmd
|
|
ARG PROJECT_VERSION=0.0.0
|
|
RUN CGO_ENABLED=0 go build -o /constellation/build/kmsserver -trimpath -buildvcs=false -ldflags "-s -w -buildid='' -X github.com/edgelesssys/constellation/internal/constants.VersionInfo=${PROJECT_VERSION}"
|
|
|
|
FROM scratch as release
|
|
COPY --from=build /constellation/build/kmsserver /kmsserver
|
|
ENTRYPOINT ["/kmsserver"]
|