Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go 1.21 #24

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions 20240206/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
FROM gcr.io/google.com/cloudsdktool/cloud-sdk:slim

ARG GOLANG_VERSION=1.21.7
ARG GOLANG_DOWNLOAD_SHA256=13b76a9b2a26823e53062fa841b07087d48ae2ef2936445dc34c4ae03293702c

ARG GOPATH=/go
ENV GOPATH=${GOPATH} \
PATH=/go/bin:/usr/local/go/bin:$PATH

RUN set -eux && \
# 基本ツール
apt-get update && \
apt-get install -yqq --no-install-suggests --no-install-recommends \
libc6-dev \
make \
unzip \
npm \
dnsutils && \
rm -rf /var/lib/apt/lists/* && \
\
# Go
curl -o go.tgz -sSL "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz" && \
echo "${GOLANG_DOWNLOAD_SHA256} *go.tgz" | sha256sum -c - && \
tar -C /usr/local -xzf go.tgz && \
rm go.tgz && \
mkdir ${GOPATH} && \
\
# 各種ツール
go install golang.org/x/tools/cmd/goimports@latest && \
go install mvdan.cc/gofumpt@latest && \
go install github.com/daixiang0/gci@latest && \
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.54.2 && \
go install github.com/99designs/gqlgen@v0.17.43 && \
go install github.com/Yamashou/gqlgenc@v0.18.1 && \
go install github.com/gqlgo/nodecheck/cmd/nodecheck@v1.0.1 && \
go install github.com/gqlgo/deprecatedquery/cmd/deprecatedquery@v0.0.3 && \
go install github.com/gqlgo/optionalschema/cmd/optionalschema@v0.0.2 && \
go install github.com/gqlgo/operationname/cmd/operationname@v0.0.1 && \
go install github.com/gqlgo/iddirective/cmd/iddirective@v0.0.1 && \
go install github.com/builtbystack/nopermission/cmd/nopermission@v0.0.2 && \
go install github.com/daichirata/hammer@latest && \
go install mvdan.cc/sh/v3/cmd/shfmt@latest && \
go install github.com/google/yamlfmt/cmd/yamlfmt@latest && \
go install github.com/google/ko@v0.12.0 && \
go install github.com/sonatard/runenv@latest && \
rm -rf ${GOPATH}/src ${GOPATH}/pkg && \
\
# Artifact RegistryにPushするための認証設定
gcloud auth configure-docker asia-northeast1-docker.pkg.dev