-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
75 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,54 @@ | ||
name: ssh-server | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
IMAGE_NAME: ssh-server | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to GHCR | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ${{ env.IMAGE_NAME }}/Dockerfile | ||
platforms: linux/amd64,linux/arm64/v8,arm/v7 | ||
push: true | ||
tags: | | ||
${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest | ||
ghcr.io/${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest | ||
- name: Sync README.md to DockerHub | ||
uses: ms-jpq/sync-dockerhub-readme@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
repository: ${{ secrets.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }} | ||
readme: "./${{ env.IMAGE_NAME }}/README.md" |
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,11 @@ | ||
FROM alpine:latest | ||
|
||
RUN apk add --no-cache openssh-server && \ | ||
adduser -D sshuser && passwd -u sshuser && ssh-keygen -A | ||
|
||
RUN mkdir /home/sshuser/.ssh && \ | ||
chown sshuser:sshuser /home/sshuser/.ssh && \ | ||
chmod 700 /home/sshuser/.ssh | ||
|
||
ENTRYPOINT ["/usr/sbin/sshd", "-De", "-f", "/etc/ssh/sshd_config"] | ||
CMD ["-p", "2222"] |
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,10 @@ | ||
# ssh-server | ||
|
||
|
||
|
||
## Dockerfile | ||
|
||
https://github.com/aceberg/my-dockerfiles/blob/main/ssh-server/Dockerfile | ||
|
||
|
||
|