kubernetes-entrypoint/images/Dockerfile.ubuntu_focal
Mohammed Naser 5dcc0bf0b2 Update to Go 1.21
This patch updates the whole code to use the latest Go version 1.21
and also updates the dependencies to the latest versions.

Change-Id: Ie0b346e4622c56825aeda176f63ae4e55f06a2ce
2024-03-26 15:10:40 +00:00

39 lines
1.1 KiB
Docker

ARG FROM=ubuntu:20.04
# Build the manager binary
FROM golang:1.21-bullseye as builder
ARG TARGETOS
ARG TARGETARCH
SHELL [ "/bin/bash", "-cex" ]
ADD . /usr/src/kubernetes-entrypoint
WORKDIR /usr/src/kubernetes-entrypoint
ENV GO111MODULE=on
RUN make get-modules
ARG MAKE_TARGET=build
RUN make ${MAKE_TARGET}
FROM ${FROM} as release
LABEL org.opencontainers.image.authors='airship-discuss@lists.airshipit.org, irc://#airshipit@freenode' \
org.opencontainers.image.url='https://airshipit.org' \
org.opencontainers.image.documentation='https://docs.airshipit.org/kubernetes-entrypoint' \
org.opencontainers.image.source='https://opendev.org/airship/kubernetes-entrypoint' \
org.opencontainers.image.vendor='The Airship Authors' \
org.opencontainers.image.licenses='Apache-2.0'
ENV DEBIAN_FRONTEND noninteractive
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
COPY --from=builder /usr/src/kubernetes-entrypoint/bin/kubernetes-entrypoint /usr/local/bin/kubernetes-entrypoint
RUN apt update \
&& apt install -y --no-install-recommends coreutils
USER 65534
ENTRYPOINT [ "/usr/local/bin/kubernetes-entrypoint" ]