This commit is contained in:
Nite07 2024-11-20 22:55:28 +08:00
parent d3905eb9bc
commit 5de5e4a224
7 changed files with 7 additions and 103 deletions

View File

@ -1,7 +1,9 @@
name: docker-caddy
on:
workflow_dispatch:
push:
tags:
- "caddy*"
jobs:
build:

View File

@ -1,31 +0,0 @@
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
context: ./dev-env

View File

@ -1,9 +1,9 @@
name: docker-tailscale-derper
on:
schedule:
- cron: "0 0 * * 1"
workflow_dispatch:
push:
tags:
- "tailscale*"
jobs:
build:

View File

@ -1,2 +1,2 @@
- [tailscale derper](./README-tailscale-derper.md)
- my dev env
- caddy

View File

@ -1,42 +0,0 @@
FROM debian:12
RUN apt-get update && apt-get install -y \
curl \
git \
vim \
wget \
unzip \
make \
gcc \
build-essential \
openssh-server
RUN rm -rf /var/lib/apt/lists/*
ENV GO_VERSION=1.21.3
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
RUN mkdir /var/run/sshd
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
EXPOSE 22
COPY start.sh /start.sh
RUN chmod +x /start.sh
ENTRYPOINT ["/start.sh"]
CMD ["bash"]

View File

@ -1,12 +0,0 @@
services:
dev-env:
image: nite07/dev-env:latest
volumes:
- ./workspace:/workspace
restart: unless-stopped
tty: true
stdin_open: true
ports:
- 2222:22
environment:
- SSH_PASSWORD=changeme

View File

@ -1,13 +0,0 @@
#!/bin/bash
if [ -z "$SSH_PASSWORD" ]; then
echo "Error: SSH_PASSWORD is not set. Please provide a password."
exit 1
fi
echo "root:$SSH_PASSWORD" | chpasswd
echo "SSH password for root is set to: $SSH_PASSWORD"
service ssh start
exec "$@"