update-alternatives to ensure gofmt is goboring gofmt (#3540)

This commit is contained in:
Cian Johnston 2022-08-17 21:03:44 +01:00 committed by GitHub
parent d6351a6b9f
commit 53d1fb36db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -174,6 +174,9 @@ RUN apt-get update && \
RUN update-alternatives --install /usr/local/bin/initdb initdb /usr/lib/postgresql/11/bin/initdb 100 && \
update-alternatives --install /usr/local/bin/postgres postgres /usr/lib/postgresql/11/bin/postgres 100
# Ensure goboring is made the default Go
RUN update-alternatives --install /usr/local/bin/gofmt gofmt /usr/local/goboring/bin/gofmt 100
# Create links for injected dependencies
RUN ln --symbolic /var/tmp/coder/coder-cli/coder /usr/local/bin/coder && \
ln --symbolic /var/tmp/coder/code-server/bin/code-server /usr/local/bin/code-server