|
|
@@ -7,6 +7,13 @@ FROM ${REGISTRY}/${BASE_IMAGE_NAME}:${BASE_VERSION} AS image
|
|
|
|
ARG DISTRO=alma9
|
|
|
|
ARG DISTRO=alma9
|
|
|
|
ARG GO_CACHE_PLUGIN_VERSION=v0.1.0
|
|
|
|
ARG GO_CACHE_PLUGIN_VERSION=v0.1.0
|
|
|
|
ARG GO_CACHE_PLUGIN_SHA256=0eb23d06a0dcf395559cb6447864579c220e60148fdcd6a6f841c2b17169b9b8
|
|
|
|
ARG GO_CACHE_PLUGIN_SHA256=0eb23d06a0dcf395559cb6447864579c220e60148fdcd6a6f841c2b17169b9b8
|
|
|
|
|
|
|
|
# `go install` writes to $GOPATH/bin, which nothing puts on PATH by default, so an
|
|
|
|
|
|
|
|
# installed tool is not runnable. Match the official golang images: GOPATH out of root's
|
|
|
|
|
|
|
|
# home, its bin on PATH, and world-writable so this still works if the image ever runs
|
|
|
|
|
|
|
|
# as non-root.
|
|
|
|
|
|
|
|
ENV GOPATH=/go
|
|
|
|
|
|
|
|
ENV PATH=/go/bin:$PATH
|
|
|
|
|
|
|
|
|
|
|
|
COPY distros/${DISTRO}/ /tmp/distro/
|
|
|
|
COPY distros/${DISTRO}/ /tmp/distro/
|
|
|
|
# DL3041: versions are pinned by the estate dnf repos, not here. SC2086: $PACKAGES is a
|
|
|
|
# DL3041: versions are pinned by the estate dnf repos, not here. SC2086: $PACKAGES is a
|
|
|
|
# word list on purpose. DL4006: the only pipe ends in sha256sum, whose status is the
|
|
|
|
# word list on purpose. DL4006: the only pipe ends in sha256sum, whose status is the
|
|
|
@@ -20,5 +27,7 @@ RUN set -eux; \
|
|
|
|
"https://git.unkin.net/unkin/go-cache-plugin/releases/download/${GO_CACHE_PLUGIN_VERSION}/go-cache-plugin-linux-amd64"; \
|
|
|
|
"https://git.unkin.net/unkin/go-cache-plugin/releases/download/${GO_CACHE_PLUGIN_VERSION}/go-cache-plugin-linux-amd64"; \
|
|
|
|
echo "$GO_CACHE_PLUGIN_SHA256 /usr/local/bin/go-cache-plugin" | sha256sum -c -; \
|
|
|
|
echo "$GO_CACHE_PLUGIN_SHA256 /usr/local/bin/go-cache-plugin" | sha256sum -c -; \
|
|
|
|
chmod 0755 /usr/local/bin/go-cache-plugin; \
|
|
|
|
chmod 0755 /usr/local/bin/go-cache-plugin; \
|
|
|
|
|
|
|
|
mkdir -p "$GOPATH/bin"; \
|
|
|
|
|
|
|
|
chmod -R 1777 "$GOPATH"; \
|
|
|
|
rm -rf /var/cache/dnf /tmp/distro
|
|
|
|
rm -rf /var/cache/dnf /tmp/distro
|
|
|
|
CMD ["/bin/bash"]
|
|
|
|
CMD ["/bin/bash"]
|
|
|
|