Skip to content

Commit

Permalink
Merge pull request #330 from linuxserver/code-server-golang-url
Browse files Browse the repository at this point in the history
update url
  • Loading branch information
quietsy committed Feb 17, 2022
2 parents 703c5ff + 3c3d418 commit f1b0726
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/BuildImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build image
run: |
# Set version
GO_WEBSITE=$(curl -sX GET https://golang.org/dl/)
GO_WEBSITE=$(curl -sLX GET https://go.dev/dl/)
GO_VERSION=${{ github.event.inputs.GO_VERSION }}
GO_VERSION=${GO_VERSION:-$(echo "$GO_WEBSITE" | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)')}
if [ $(echo "$GO_VERSION" | tr -d -c '.' | awk '{ print length; }') = "1" ]; then GO_TAG="${GO_VERSION}.0"; else GO_TAG="${GO_VERSION}"; fi
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.12 as buildstage
FROM ghcr.io/linuxserver/baseimage-alpine:3.15 as buildstage

ARG GO_VERSION

Expand All @@ -7,18 +7,18 @@ RUN \
curl \
grep && \
if [ -z ${GO_VERSION+x} ]; then \
GO_VERSION=$(curl -sX GET https://golang.org/dl/ | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \
GO_VERSION=$(curl -sLX GET https://go.dev/dl/ | grep -o '<span.*>.*linux-amd64.*</span>' | grep -oP '(?<=go).*(?=.linux)'); \
fi && \
mkdir -p /root-layer/golang && \
curl -o \
/root-layer/golang/golang_x86_64.tar.gz -L \
https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \
https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
curl -o \
/root-layer/golang/golang_armv7l.tar.gz -L \
https://dl.google.com/go/go${GO_VERSION}.linux-armv6l.tar.gz && \
https://go.dev/dl/go${GO_VERSION}.linux-armv6l.tar.gz && \
curl -o \
/root-layer/golang/golang_aarch64.tar.gz -L \
https://dl.google.com/go/go${GO_VERSION}.linux-arm64.tar.gz
https://go.dev/dl/go${GO_VERSION}.linux-arm64.tar.gz

COPY root/ /root-layer/

Expand Down

0 comments on commit f1b0726

Please sign in to comment.