Skip to content

Commit a3c7a7d

Browse files
committed
Added SSH Docker image
1 parent d09fbf7 commit a3c7a7d

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

.github/workflows/build-ssh.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: build-ssh
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
ssh:
7+
runs-on: ubuntu-latest
8+
steps:
9+
-
10+
name: Checkout
11+
uses: actions/checkout@v2
12+
-
13+
name: Set up QEMU
14+
uses: docker/setup-qemu-action@v1
15+
-
16+
name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v1
18+
-
19+
name: Login to DockerHub
20+
uses: docker/login-action@v1
21+
with:
22+
username: ${{ secrets.DOCKERHUB_USERNAME }}
23+
password: ${{ secrets.DOCKERHUB_TOKEN }}
24+
-
25+
name: Build and push
26+
id: docker_build
27+
uses: docker/build-push-action@v2
28+
with:
29+
context: images/php/7.3
30+
platforms: linux/amd64,linux/arm64
31+
push: true
32+
tags: markoshust/ssh

images/ssh/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM debian:buster-slim
2+
3+
ARG APP_ID=1000
4+
5+
RUN apt-get update && apt-get install -y ssh
6+
7+
RUN groupadd -g "$APP_ID" app \
8+
&& useradd -g "$APP_ID" -u "$APP_ID" -d /var/www -s /bin/bash app
9+
10+
RUN echo 'app:app' | chpasswd
11+
12+
RUN service ssh start
13+
14+
EXPOSE 22
15+
16+
CMD ["/usr/sbin/sshd","-D"]

0 commit comments

Comments
 (0)