Skip to content
This repository was archived by the owner on May 4, 2022. It is now read-only.

Commit 8e79388

Browse files
committed
Fix Go pinning
Go pinning was not working before because multiple versions of go were being installed via apt: One to build prybar and one for the actual go language config. Ideally these two versions of Go can be independent of each other. With this change, a specific version Go is downloaded directly from the golang site and is installed in /usr/local/go. This is then added to the PATH so once the image is built, anything run in the container will use the version of go set in the go.toml config.
1 parent c9c8de9 commit 8e79388

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ COPY --from=0 /out/polygott-x11-vnc /usr/bin/polygott-x11-vnc
4444
ENV LC_ALL=en_US.UTF-8
4545
ENV LANG=en_US.UTF-8
4646
ENV VIRTUAL_ENV="/opt/virtualenvs/python3"
47-
ENV PATH="${VIRTUAL_ENV}/bin:/usr/GNUstep/System/Tools:/usr/GNUstep/Local/Tools:${PATH}"
47+
ENV PATH="/usr/local/go/bin:${VIRTUAL_ENV}/bin:/usr/GNUstep/System/Tools:/usr/GNUstep/Local/Tools:${PATH}"
4848
ENV PYTHONPATH="${VIRTUAL_ENV}/lib/python3.8/site-packages"
4949
ENV USER=runner
5050

languages/go.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@ entrypoint = "main.go"
66
extensions = [
77
"go"
88
]
9-
aptRepos = [
10-
"ppa:longsleep/golang-backports"
11-
]
129

1310
packages = [
14-
"golang-1.14-go",
1511
"pkg-config"
1612
]
1713
setup = [
18-
"go get -u github.com/saibing/bingo"
14+
"cd /tmp && wget -q https://golang.org/dl/go1.14.7.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.14.7.linux-amd64.tar.gz && rm go1.14.7.linux-amd64.tar.gz",
15+
"/usr/local/go/bin/go get -u github.com/saibing/bingo"
1916
]
2017

2118
[compile]

0 commit comments

Comments
 (0)