go-webserver-template (1)

Published 2024-06-17 15:56:21 +10:00 by nathanwoodburn in nathanwoodburn/go-webserver-template

Installation

docker pull git.woodburn.au/nathanwoodburn/go-webserver-template:1
sha256:3564b45b33fee230e840073132764619d092252f67eaecb1dba47475a065276a

Image Layers

ADD file:8415eb847ca46ed1aa1695965af86f1a0f09e8859a7b3c07b2f719404b665102 in /
CMD ["bash"]
/bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates curl gnupg netbase sq wget ; rm -rf /var/lib/apt/lists/*
/bin/sh -c apt-get update && apt-get install -y --no-install-recommends git mercurial openssh-client subversion procps && rm -rf /var/lib/apt/lists/*
/bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends g++ gcc libc6-dev make pkg-config ; rm -rf /var/lib/apt/lists/*
ENV PATH=/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV GOLANG_VERSION=1.19.13
/bin/sh -c set -eux; arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; url=; case "$arch" in 'amd64') url='https://dl.google.com/go/go1.19.13.linux-amd64.tar.gz'; sha256='4643d4c29c55f53fa0349367d7f1bb5ca554ea6ef528c146825b0f8464e2e668'; ;; 'armel') export GOARCH='arm' GOARM='5' GOOS='linux'; ;; 'armhf') url='https://dl.google.com/go/go1.19.13.linux-armv6l.tar.gz'; sha256='9dfd42b41057514454134552854cd1a5a47d501b760c87e9b0d3b0665374d8d9'; ;; 'arm64') url='https://dl.google.com/go/go1.19.13.linux-arm64.tar.gz'; sha256='1142ada7bba786d299812b23edd446761a54efbbcde346c2f0bc69ca6a007b58'; ;; 'i386') url='https://dl.google.com/go/go1.19.13.linux-386.tar.gz'; sha256='8368a9fdb3ab78da1ce75b80dc765c2814ca42afc2cf7e7dc45a1a61eaea22be'; ;; 'mips64el') export GOARCH='mips64le' GOOS='linux'; ;; 'ppc64el') url='https://dl.google.com/go/go1.19.13.linux-ppc64le.tar.gz'; sha256='fe02b81fd18913a19de420929f1fc2698eea15e90ad1d13471168fcdabe3aaff'; ;; 'riscv64') export GOARCH='riscv64' GOOS='linux'; ;; 's390x') url='https://dl.google.com/go/go1.19.13.linux-s390x.tar.gz'; sha256='af324cb46b268722e8ed3c7ecac87af4ee288ccb50be30ce2184fa7210495fb9'; ;; *) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; esac; build=; if [ -z "$url" ]; then build=1; url='https://dl.google.com/go/go1.19.13.src.tar.gz'; sha256='ccf36b53fb0024a017353c3ddb22c1f00bc7a8073c6aac79042da24ee34434d3'; echo >&2; echo >&2 "warning: current architecture ($arch) does not have a compatible Go binary release; will be building from source"; echo >&2; fi; wget -O go.tgz.asc "$url.asc"; wget -O go.tgz "$url" --progress=dot:giga; echo "$sha256 *go.tgz" | sha256sum -c -; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; gpg --batch --keyserver keyserver.ubuntu.com --recv-keys '2F52 8D36 D67B 69ED F998 D857 78BD 6547 3CB3 BD13'; gpg --batch --verify go.tgz.asc go.tgz; gpgconf --kill all; rm -rf "$GNUPGHOME" go.tgz.asc; tar -C /usr/local -xzf go.tgz; rm go.tgz; if [ -n "$build" ]; then savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends golang-go; export GOCACHE='/tmp/gocache'; ( cd /usr/local/go/src; export GOROOT_BOOTSTRAP="$(go env GOROOT)" GOHOSTOS="$GOOS" GOHOSTARCH="$GOARCH"; ./make.bash; ); apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark > /dev/null; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/*; rm -rf /usr/local/go/pkg/*/cmd /usr/local/go/pkg/bootstrap /usr/local/go/pkg/obj /usr/local/go/pkg/tool/*/api /usr/local/go/pkg/tool/*/go_bootstrap /usr/local/go/src/cmd/dist/dist "$GOCACHE" ; fi; go version
ENV GOPATH=/go
ENV PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/bin/sh -c mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"
WORKDIR /go
WORKDIR /app
COPY main.go ./ # buildkit
COPY templates ./templates/ # buildkit
RUN /bin/sh -c go build main.go # buildkit
EXPOSE map[3000/tcp:{}]
CMD ["./main"]
Details
Container
2024-06-17 15:56:21 +10:00
0
OCI / Docker
linux/amd64
366 MiB
Versions (6) View all
latest 2024-06-22
8 2024-06-22
7 2024-06-20
3 2024-06-17
2 2024-06-17