From 6246b519edb35236a4e1186f1c48b5430ece4046d4a19cff78cc86fab1ee78ba Mon Sep 17 00:00:00 2001 From: Marco Varlese Date: Thu, 25 Mar 2021 14:00:51 +0000 Subject: [PATCH] Accepting request 881319 from home:dirkmueller:branches:devel:kubic:containers - avoid using entrypoint in development build containers - reduce unnecessary layers - create and set a GOPATH - Include Frederics fix as well ------------------------------------------------------------------ - Allow to override base container and release package using Docker arguments. OBS-URL: https://build.opensuse.org/request/show/881319 OBS-URL: https://build.opensuse.org/package/show/devel:kubic:containers/go1.16-devel-container?expand=0&rev=12 --- Dockerfile | 18 ++++++++++++------ go1.16-devel-container.changes | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e3d4b19..0472e22 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ #!BuildTag: opensuse/golang:%%PKG_VERSION%% #!BuildTag: opensuse/golang:%%PKG_VERSION%%.%RELEASE% -FROM opensuse/tumbleweed +ARG BASE=opensuse/tumbleweed +FROM $BASE # labelprefix=org.opensuse.golang PREFIXEDLABEL org.opencontainers.image.title="Go 1.16 development container" @@ -13,10 +14,15 @@ PREFIXEDLABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%" PREFIXEDLABEL org.openbuildservice.disturl="%DISTURL%" PREFIXEDLABEL org.opensuse.reference="registry.opensuse.org/opensuse/golang:%%PKG_VERSION%%.%RELEASE%" +ENV GOLANG_VERSION %%PKG_VERSION%% +ENV GOPATH /go +ENV PATH $GOPATH/bin:$PATH + # Work around https://github.com/openSUSE/obs-build/issues/487 -RUN zypper install -y openSUSE-release-appliance-docker +ARG RELEASE_PACKAGE=openSUSE-release-appliance-docker +RUN zypper install -y --no-recommends $RELEASE_PACKAGE go1.16 git-core && \ + zypper clean && \ + mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" -# Development packages -RUN zypper install -y --no-recommends go1.16 git-core - -ENTRYPOINT [ "/bin/bash" ] +WORKDIR $GOPATH +CMD [ "/bin/bash" ] diff --git a/go1.16-devel-container.changes b/go1.16-devel-container.changes index 133e666..b7c5e8f 100644 --- a/go1.16-devel-container.changes +++ b/go1.16-devel-container.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 25 13:49:02 UTC 2021 - Dirk Müller + +- avoid using entrypoint in development build containers +- reduce unnecessary layers +- create and set a GOPATH + ------------------------------------------------------------------- Wed Mar 24 12:17:43 UTC 2021 - Marco Varlese @@ -13,6 +20,17 @@ Tue Mar 23 15:59:40 UTC 2021 - Marco Varlese - Fix to version which missed the 1. in front of it +------------------------------------------------------------------- +Tue Mar 23 14:59:34 UTC 2021 - Dirk Müller + +- Include Frederics fix as well + +------------------------------------------------------------------ +Mon Mar 22 13:28:11 UTC 2021 - Frederic Crozat + +- Allow to override base container and release package using + Docker arguments. + ------------------------------------------------------------------- Fri Dec 11 14:10:47 UTC 2020 - Marco Varlese