41 lines
1.8 KiB
Docker
41 lines
1.8 KiB
Docker
FROM docker.io/bitnami/minideb:bullseye
|
|
|
|
ARG TARGETARCH
|
|
|
|
LABEL org.opencontainers.image.authors="https://bitnami.com/contact" \
|
|
org.opencontainers.image.description="Application packaged by Bitnami" \
|
|
org.opencontainers.image.ref.name="1.17.13-debian-11-r12" \
|
|
org.opencontainers.image.source="https://github.com/bitnami/containers/tree/main/bitnami/golang" \
|
|
org.opencontainers.image.title="golang" \
|
|
org.opencontainers.image.vendor="VMware, Inc." \
|
|
org.opencontainers.image.version="1.17.13"
|
|
|
|
ENV OS_ARCH="${TARGETARCH:-amd64}" \
|
|
OS_FLAVOUR="debian-11" \
|
|
OS_NAME="linux"
|
|
|
|
COPY prebuildfs /
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
# Install required system packages and dependencies
|
|
RUN install_packages build-essential ca-certificates curl git gzip libc6 pkg-config procps tar unzip
|
|
RUN mkdir -p /tmp/bitnami/pkg/cache/ && cd /tmp/bitnami/pkg/cache/ && \
|
|
if [ ! -f golang-1.17.13-2-linux-${OS_ARCH}-debian-11.tar.gz ]; then \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/golang-1.17.13-2-linux-${OS_ARCH}-debian-11.tar.gz -O ; \
|
|
curl -SsLf https://downloads.bitnami.com/files/stacksmith/golang-1.17.13-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 -O ; \
|
|
fi && \
|
|
sha256sum -c golang-1.17.13-2-linux-${OS_ARCH}-debian-11.tar.gz.sha256 && \
|
|
tar -zxf golang-1.17.13-2-linux-${OS_ARCH}-debian-11.tar.gz -C /opt/bitnami --strip-components=2 --no-same-owner --wildcards '*/files' && \
|
|
rm -rf golang-1.17.13-2-linux-${OS_ARCH}-debian-11.tar.gz
|
|
RUN apt-get update && apt-get upgrade -y && \
|
|
rm -r /var/lib/apt/lists /var/cache/apt/archives
|
|
RUN mkdir -p "/go/src" "/go/bin" && chmod -R 777 "/go"
|
|
|
|
ENV APP_VERSION="1.17.13" \
|
|
BITNAMI_APP_NAME="golang" \
|
|
GOCACHE="/go/.cache" \
|
|
GOPATH="/go" \
|
|
PATH="/go/bin:/opt/bitnami/go/bin:$PATH"
|
|
|
|
WORKDIR $GOPATH
|
|
CMD [ "bash" ]
|