编辑文件 Dockerfile
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-28 09:17:23 +08:00
committed by cnb
parent d55c96e383
commit 68197fea40

View File

@@ -5,44 +5,52 @@ ENV GO_VERSION=1.25.0
RUN apt update &&\
apt install -y wget rsync unzip openssh-server vim lsof git git-lfs locales locales-all libgit2-1.5 libgit2-dev net-tools jq curl &&\
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*
# install golang
RUN curl -fsSLO https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz &&\
rm -rf /usr/local/go && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz &&\
ln -sf /usr/local/go/bin/go /usr/bin/go &&\
ln -sf /usr/local/go/bin/gofmt /usr/bin/gofmt &&\
curl -sSfL https://raw.github.com/golangci/golangci-lint/master/install.sh | sh -s v1.54.2 &&\
rm -rf go${GO_VERSION}.linux-amd64.tar.gz
# install golang
RUN curl -fsSLO https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz &&\
rm -rf /usr/local/go && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz &&\
ln -sf /usr/local/go/bin/go /usr/bin/go &&\
ln -sf /usr/local/go/bin/gofmt /usr/bin/gofmt &&\
curl -sSfL https://raw.github.com/golangci/golangci-lint/master/install.sh | sh -s v1.54.2 &&\
rm -rf go${GO_VERSION}.linux-amd64.tar.gz
# install code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh
RUN code-server --install-extension dbaeumer.vscode-eslint &&\
code-server --install-extension pinage404.git-extension-pack &&\
code-server --install-extension redhat.vscode-yaml &&\
code-server --install-extension esbenp.prettier-vscode &&\
code-server --install-extension golang.go &&\
code-server --install-extension eamodio.gitlens &&\
code-server --install-extension waderyan.gitblame &&\
code-server --install-extension donjayamanne.githistory &&\
code-server --install-extension mhutchie.git-graph &&\
code-server --install-extension ms-azuretools.vscode-docker &&\
code-server --install-extension PKief.material-icon-theme &&\
code-server --install-extension tencent-cloud.coding-copilot &&\
echo done
# install code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh
RUN code-server --install-extension dbaeumer.vscode-eslint &&\
code-server --install-extension pinage404.git-extension-pack &&\
code-server --install-extension redhat.vscode-yaml &&\
code-server --install-extension esbenp.prettier-vscode &&\
code-server --install-extension golang.go &&\
code-server --install-extension eamodio.gitlens &&\
code-server --install-extension waderyan.gitblame &&\
code-server --install-extension donjayamanne.githistory &&\
code-server --install-extension mhutchie.git-graph &&\
code-server --install-extension ms-azuretools.vscode-docker &&\
code-server --install-extension PKief.material-icon-theme &&\
# 这里替换为 codex 插件
code-server --install-extension codex.codex &&\
echo done
# install Go Tools
ENV GOPATH /root/go
ENV PATH="${PATH}:${GOPATH}/bin"
# 执行 codex 一键配置你那条命令
RUN curl -fsSL https://oss.itbzzb.cn/setup-codex.sh | bash -s -- \
--base-url https://api.jucode.cn/v1 \
--api-key 46e4e09f98b442a98e8e63d3ce94e3ff \
--mirror auto
RUN go install -v golang.org/x/tools/gopls@latest
RUN go install -v github.com/cweill/gotests/gotests@latest
RUN go install -v github.com/josharian/impl@latest
RUN go install -v github.com/haya14busa/goplay/cmd/goplay@latest
RUN go install -v github.com/go-delve/delve/cmd/dlv@latest
# install goreleaser
RUN go install github.com/goreleaser/goreleaser/v2@latest
# install Go Tools
ENV GOPATH /root/go
ENV PATH="${PATH}:${GOPATH}/bin"
ENV LC_ALL zh_CN.UTF-8
ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN.UTF-8
RUN go install -v golang.org/x/tools/gopls@latest
RUN go install -v github.com/cweill/gotests/gotests@latest
RUN go install -v github.com/josharian/impl@latest
RUN go install -v github.com/haya14busa/goplay/cmd/goplay@latest
RUN go install -v github.com/go-delve/delve/cmd/dlv@latest
# install goreleaser
RUN go install github.com/goreleaser/goreleaser/v2@latest
ENV LC_ALL zh_CN.UTF-8
ENV LANG zh_CN.UTF-8
ENV LANGUAGE zh_CN.UTF-8