mirror of
https://github.com/dokku/dokku.git
synced 2026-05-18 05:05:46 +02:00
fix: ensure we install the golang for the correct architecture
TARGETARCH is an automatic build-arg that docker injects - https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope - so this is safe to depend on.
This commit is contained in:
@@ -7,8 +7,9 @@ RUN apt-get install --no-install-recommends -y build-essential file nano && \
|
||||
apt-get autoremove --yes && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN wget https://dl.google.com/go/go1.17.9.linux-amd64.tar.gz && \
|
||||
tar -xvf go1.17.9.linux-amd64.tar.gz && \
|
||||
ARG TARGETARCH
|
||||
RUN wget https://dl.google.com/go/go1.17.9.linux-${TARGETARCH}.tar.gz && \
|
||||
tar -xvf go1.17.9.linux-${TARGETARCH}.tar.gz && \
|
||||
mv go /usr/local
|
||||
|
||||
RUN GOROOT=/usr/local/go /usr/local/go/bin/go install golang.org/x/tools/gopls@latest 2>&1
|
||||
|
||||
Reference in New Issue
Block a user