Skip to content

Commit

Permalink
Fix and simplify docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
thueske committed Dec 16, 2024
1 parent 076d1b6 commit c17f184
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 82 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/docker-build-push-base.yml

This file was deleted.

24 changes: 17 additions & 7 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Build and Push Docker image
name: Build and Push Base Docker image

on:
workflow_run:
workflows: ["Build and Push Base Docker image"]
types:
- completed
push:
branches:
- main

schedule:
- cron: '0 0 * * 0'

jobs:
build:
Expand All @@ -18,6 +20,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Clone the sftp repository
run: git clone https://github.com/atmoz/sftp.git

- name: Apply sshd_config.patch
run: |
git apply sshd_config.patch --directory=sftp
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -32,9 +41,10 @@ jobs:
uses: docker/build-push-action@v3
with:
push: true
context: ./build
file: ./sftp/Dockerfile
context: ./sftp
tags: ghcr.io/hueske-digital/sftp:latest
platforms: linux/amd64,linux/arm64

- name: Do not automatically disable workflow execution
uses: gautamkrishnar/keepalive-workflow@v1
uses: gautamkrishnar/keepalive-workflow@v1
3 changes: 0 additions & 3 deletions build/Dockerfile

This file was deleted.

26 changes: 0 additions & 26 deletions build/sshd_config

This file was deleted.

18 changes: 18 additions & 0 deletions sshd_config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/files/sshd_config b/files/sshd_config
index 1308c8b..3906e95 100644
--- a/files/sshd_config
+++ b/files/sshd_config
@@ -15,8 +15,12 @@ AllowTcpForwarding no

# Force sftp and chroot jail
Subsystem sftp internal-sftp
-ForceCommand internal-sftp
+ForceCommand internal-sftp -d /stash
ChrootDirectory %h

# Enable this for more logs
#LogLevel VERBOSE
+
+# For making the brother ADS-w700W printer SFTPable
+HostKeyAlgorithms +ssh-rsa
+PubkeyAcceptedAlgorithms +ssh-rsa

0 comments on commit c17f184

Please sign in to comment.