generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a "server" for testing (with Docker)
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "3.9" | ||
|
||
services: | ||
server: | ||
build: | ||
dockerfile: docker/server.Dockerfile | ||
command: "" | ||
privileged: true | ||
cgroup: host | ||
ports: | ||
- 127.0.0.1:2222:22 | ||
volumes: | ||
- /sys/fs/cgroup:/sys/fs/cgroup:rw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM geerlingguy/docker-debian12-ansible | ||
|
||
RUN apt update && \ | ||
apt install -y ca-certificates curl gnupg openssh-server && \ | ||
install -m 0755 -d /etc/apt/keyrings && \ | ||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \ | ||
chmod a+r /etc/apt/keyrings/docker.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ | ||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ | ||
apt update && \ | ||
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | ||
|
||
RUN echo "PermitEmptyPasswords yes \n \ | ||
PermitRootLogin yes \n \ | ||
PasswordAuthentication yes" > /etc/ssh/sshd_config | ||
|
||
RUN adduser david && \ | ||
usermod -aG docker david && \ | ||
echo "david ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/david && \ | ||
passwd -d david |