Files
kubesphere/build/ks-apiserver/Dockerfile
hongzhouzi ade0d324da Upgrade go version to 1.19 (#5446)
Signed-off-by: hongzhouzi <hongzhouzi@kubesphere.io>
2023-01-12 16:48:34 +08:00

29 lines
521 B
Docker

# Copyright 2020 The KubeSphere Authors. All rights reserved.
# Use of this source code is governed by an Apache license
# that can be found in the LICENSE file.
# Build
FROM golang:1.19.4 as build_context
ENV OUTDIR=/out
RUN mkdir -p ${OUTDIR}/usr/local/bin/
WORKDIR /workspace
ADD . /workspace/
RUN make ks-apiserver
RUN mv /workspace/bin/cmd/ks-apiserver ${OUTDIR}/usr/local/bin/
##############
# Final image
#############
FROM alpine:3.16.2
COPY --from=build_context /out/ /
WORKDIR /
EXPOSE 9090
CMD ["sh"]