This commit is contained in:
Nite07 2024-10-06 19:27:30 +08:00
parent 7715ea4df5
commit 5566a60040
4 changed files with 61 additions and 1 deletions

31
.github/workflows/docker-dev-env.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: docker-dev-env
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: nite07/dev-env:latest
platforms: linux/amd64
file: ./Dockerfile-dev-env.dockerfile

View File

@ -30,4 +30,4 @@ jobs:
push: true push: true
tags: nite07/tailscale-derp-docker:latest tags: nite07/tailscale-derp-docker:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7
file: ./Dockerfile-tailscale-derper file: ./Dockerfile-tailscale-derper.dockerfile

View File

@ -0,0 +1,29 @@
FROM debian:12
RUN apt-get update && apt-get install -y \
curl \
git \
vim \
wget \
unzip \
make \
gcc \
build-essential
ENV GO_VERSION=1.23.2
RUN curl -OL https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz
RUN tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
RUN rm go${GO_VERSION}.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin
ENV GOPATH=/go
ENV PATH=$PATH:$GOPATH/bin
WORKDIR /workspace
RUN go install github.com/go-delve/delve/cmd/dlv@latest
RUN go install golang.org/x/tools/gopls@latest
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
RUN go install github.com/goreleaser/goreleaser/v2@latest
CMD ["bash"]