📝
This commit is contained in:
parent
a95fda9e18
commit
0c51061149
2
.github/workflows/docker-dev-env.yml
vendored
2
.github/workflows/docker-dev-env.yml
vendored
@ -28,4 +28,4 @@ jobs:
|
||||
push: true
|
||||
tags: nite07/dev-env:latest
|
||||
platforms: linux/amd64
|
||||
file: ./Dockerfile-dev-env.dockerfile
|
||||
context: ./dev-env
|
||||
|
@ -30,4 +30,4 @@ jobs:
|
||||
push: true
|
||||
tags: nite07/tailscale-derp-docker:latest
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
file: ./Dockerfile-tailscale-derper.dockerfile
|
||||
context: ./tailscale-derper
|
||||
|
@ -8,9 +8,12 @@ RUN apt-get update && apt-get install -y \
|
||||
unzip \
|
||||
make \
|
||||
gcc \
|
||||
build-essential
|
||||
build-essential \
|
||||
openssh-server
|
||||
|
||||
ENV GO_VERSION=1.23.2
|
||||
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
|
||||
@ -26,4 +29,14 @@ 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"]
|
12
dev-env/docker-compose.yaml
Normal file
12
dev-env/docker-compose.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
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
|
13
dev-env/start.sh
Normal file
13
dev-env/start.sh
Normal file
@ -0,0 +1,13 @@
|
||||
#!/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 "$@"
|
Loading…
Reference in New Issue
Block a user