Skip to content

Commit

Permalink
Latest go 1.20 and IM images
Browse files Browse the repository at this point in the history
  • Loading branch information
dooman87 committed Dec 22, 2023
1 parent 3b85d0d commit f0d1311
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 33 deletions.
37 changes: 20 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dpokidov/imagemagick:7.1.1-17-bullseye AS build
FROM dpokidov/imagemagick:7.1.1-22-bullseye AS build

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
g++ \
Expand All @@ -16,50 +16,53 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-reco
#Installing golang
ENV PATH /usr/local/go/bin:$PATH

ENV GOLANG_VERSION 1.20.5
ENV GOLANG_VERSION 1.20.12

RUN set -eux; \
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
url=; \
case "$arch" in \
'amd64') \
url='https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz'; \
sha256='d7ec48cde0d3d2be2c69203bc3e0a44de8660b9c09a6e85c4732a3f7dc442612'; \
url='https://dl.google.com/go/go1.20.12.linux-amd64.tar.gz'; \
sha256='9c5d48c54dd8b0a3b2ef91b0f92a1190aa01f11d26e98033efa64c46a30bba7b'; \
;; \
'armel') \
export GOARCH='arm' GOARM='5' GOOS='linux'; \
;; \
'armhf') \
url='https://dl.google.com/go/go1.20.5.linux-armv6l.tar.gz'; \
sha256='79d8210efd4390569912274a98dffc16eb85993cccdeef4d704e9b0dfd50743a'; \
url='https://dl.google.com/go/go1.20.12.linux-armv6l.tar.gz'; \
sha256='bf4687cbbf0c44a82311d52e2dcccb263f3d9c3b512007e1fae569e03dc0a189'; \
;; \
'arm64') \
url='https://dl.google.com/go/go1.20.5.linux-arm64.tar.gz'; \
sha256='aa2fab0a7da20213ff975fa7876a66d47b48351558d98851b87d1cfef4360d09'; \
url='https://dl.google.com/go/go1.20.12.linux-arm64.tar.gz'; \
sha256='8afe8e3fb6972eaa2179ef0a71678c67f26509fab4f0f67c4b00f4cdfa92dc87'; \
;; \
'i386') \
url='https://dl.google.com/go/go1.20.5.linux-386.tar.gz'; \
sha256='d394ac8fecf66812c78ffba7fb9a265bb1b9917564c7fd77f0edb0df6d5777a1'; \
url='https://dl.google.com/go/go1.20.12.linux-386.tar.gz'; \
sha256='77db17c6350448b0c3afa5c4248426d8a445b5e8ac2411fff57463b47f8d7f80'; \
;; \
'mips64el') \
export GOARCH='mips64le' GOOS='linux'; \
;; \
'ppc64el') \
url='https://dl.google.com/go/go1.20.5.linux-ppc64le.tar.gz'; \
sha256='049b8ab07d34077b90c0642138e10207f6db14bdd1743ea994a21e228f8ca53d'; \
url='https://dl.google.com/go/go1.20.12.linux-ppc64le.tar.gz'; \
sha256='2ae0ec3736216dfbd7b01ff679842dc1bed365e53a024d522645bcffd01c7328'; \
;; \
'riscv64') \
export GOARCH='riscv64' GOOS='linux'; \
;; \
's390x') \
url='https://dl.google.com/go/go1.20.5.linux-s390x.tar.gz'; \
sha256='bac14667f1217ccce1d2ef4e204687fe6191e6dc19a8870cfb81a41f78b04e48'; \
url='https://dl.google.com/go/go1.20.12.linux-s390x.tar.gz'; \
sha256='ee48b23e1978a866cb60a8e8ddf0bd61cbbaf86bcfcdbf4f9509f34e9159ce45'; \
;; \
*) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \
esac; \
build=; \
if [ -z "$url" ]; then \
# https://github.com/golang/go/issues/38536#issuecomment-616897960
build=1; \
url='https://dl.google.com/go/go1.20.5.src.tar.gz'; \
sha256='9a15c133ba2cfafe79652f4815b62e7cfc267f68df1b9454c6ab2a3ca8b96a88'; \
url='https://dl.google.com/go/go1.20.12.src.tar.gz'; \
sha256='c5bf934751d31c315c1d0bb5fb02296545fa6d08923566f7a5afec81f2ed27d6'; \
echo >&2; \
echo >&2 "warning: current architecture ($arch) does not have a compatible Go binary release; will be building from source"; \
echo >&2; \
Expand Down Expand Up @@ -134,7 +137,7 @@ WORKDIR /go/src/github.com/Pixboost/transformimgs/cmd

RUN go build -o /transformimgs

FROM dpokidov/imagemagick:7.1.1-17-bullseye
FROM dpokidov/imagemagick:7.1.1-22-bullseye

ENV IM_HOME /usr/local/bin

Expand Down
35 changes: 19 additions & 16 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM dpokidov/imagemagick:7.1.1-17-bullseye
FROM dpokidov/imagemagick:7.1.1-22-bullseye

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
g++ \
Expand All @@ -16,50 +16,53 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-reco
#Installing golang
ENV PATH /usr/local/go/bin:$PATH

ENV GOLANG_VERSION 1.20.5
ENV GOLANG_VERSION 1.20.12

RUN set -eux; \
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
url=; \
case "$arch" in \
'amd64') \
url='https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz'; \
sha256='d7ec48cde0d3d2be2c69203bc3e0a44de8660b9c09a6e85c4732a3f7dc442612'; \
url='https://dl.google.com/go/go1.20.12.linux-amd64.tar.gz'; \
sha256='9c5d48c54dd8b0a3b2ef91b0f92a1190aa01f11d26e98033efa64c46a30bba7b'; \
;; \
'armel') \
export GOARCH='arm' GOARM='5' GOOS='linux'; \
;; \
'armhf') \
url='https://dl.google.com/go/go1.20.5.linux-armv6l.tar.gz'; \
sha256='79d8210efd4390569912274a98dffc16eb85993cccdeef4d704e9b0dfd50743a'; \
url='https://dl.google.com/go/go1.20.12.linux-armv6l.tar.gz'; \
sha256='bf4687cbbf0c44a82311d52e2dcccb263f3d9c3b512007e1fae569e03dc0a189'; \
;; \
'arm64') \
url='https://dl.google.com/go/go1.20.5.linux-arm64.tar.gz'; \
sha256='aa2fab0a7da20213ff975fa7876a66d47b48351558d98851b87d1cfef4360d09'; \
url='https://dl.google.com/go/go1.20.12.linux-arm64.tar.gz'; \
sha256='8afe8e3fb6972eaa2179ef0a71678c67f26509fab4f0f67c4b00f4cdfa92dc87'; \
;; \
'i386') \
url='https://dl.google.com/go/go1.20.5.linux-386.tar.gz'; \
sha256='d394ac8fecf66812c78ffba7fb9a265bb1b9917564c7fd77f0edb0df6d5777a1'; \
url='https://dl.google.com/go/go1.20.12.linux-386.tar.gz'; \
sha256='77db17c6350448b0c3afa5c4248426d8a445b5e8ac2411fff57463b47f8d7f80'; \
;; \
'mips64el') \
export GOARCH='mips64le' GOOS='linux'; \
;; \
'ppc64el') \
url='https://dl.google.com/go/go1.20.5.linux-ppc64le.tar.gz'; \
sha256='049b8ab07d34077b90c0642138e10207f6db14bdd1743ea994a21e228f8ca53d'; \
url='https://dl.google.com/go/go1.20.12.linux-ppc64le.tar.gz'; \
sha256='2ae0ec3736216dfbd7b01ff679842dc1bed365e53a024d522645bcffd01c7328'; \
;; \
'riscv64') \
export GOARCH='riscv64' GOOS='linux'; \
;; \
's390x') \
url='https://dl.google.com/go/go1.20.5.linux-s390x.tar.gz'; \
sha256='bac14667f1217ccce1d2ef4e204687fe6191e6dc19a8870cfb81a41f78b04e48'; \
url='https://dl.google.com/go/go1.20.12.linux-s390x.tar.gz'; \
sha256='ee48b23e1978a866cb60a8e8ddf0bd61cbbaf86bcfcdbf4f9509f34e9159ce45'; \
;; \
*) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \
esac; \
build=; \
if [ -z "$url" ]; then \
# https://github.com/golang/go/issues/38536#issuecomment-616897960
build=1; \
url='https://dl.google.com/go/go1.20.5.src.tar.gz'; \
sha256='9a15c133ba2cfafe79652f4815b62e7cfc267f68df1b9454c6ab2a3ca8b96a88'; \
url='https://dl.google.com/go/go1.20.12.src.tar.gz'; \
sha256='c5bf934751d31c315c1d0bb5fb02296545fa6d08923566f7a5afec81f2ed27d6'; \
echo >&2; \
echo >&2 "warning: current architecture ($arch) does not have a compatible Go binary release; will be building from source"; \
echo >&2; \
Expand Down

0 comments on commit f0d1311

Please sign in to comment.