4 Commits 74b7d04201 ... c5853de140

Author SHA1 Message Date
  Fabian Peter Hammerle c5853de140 release v1.0.0 3 years ago
  Fabian Peter Hammerle 4443db5a55 upgrade base image from alpine v3.8 to v3.12; pin package versions 3 years ago
  Fabian Peter Hammerle 10b0fb85fe added changelog 3 years ago
  Fabian Peter Hammerle b8fe5c6c3d added docker-compose.yml for testing 3 years ago
4 changed files with 61 additions and 4 deletions
  1. 23 0
      CHANGELOG.md
  2. 8 2
      Dockerfile
  3. 2 2
      README.md
  4. 28 0
      docker-compose.yml

+ 23 - 0
CHANGELOG.md

@@ -0,0 +1,23 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [1.0.0] - 2020-07-24
+### Changed
+- upgrade base image from alpine v3.8 to v3.12
+
+### Fixed
+- empty passwords (redundant as sshd config disables password authentication)
+- pin package versions
+
+## [0.1.0] - 2019-01-01
+### Added
+- openssh server
+- client restricted to `rsync --server` command via `rrsync`
+- `rrsync` "chroots" to `/data`
+
+[Unreleased]: https://github.com/fphammerle/docker-rsync-sshd/compare/v1.0.0...master
+[1.0.0]: https://github.com/fphammerle/docker-rsync-sshd/compare/0.1-amd64...v1.0.0
+[0.1.0]: https://github.com/fphammerle/docker-rsync-sshd/tree/0.1-amd64

+ 8 - 2
Dockerfile

@@ -1,6 +1,12 @@
-FROM alpine:3.8
+FROM alpine:3.12
 
-RUN apk add --no-cache rsync rrsync openssh-server
+ARG RSYNC_PACKAGE_VERSION=3.1.3-r3
+ARG RRSYNC_PACKAGE_VERSION=3.1.3-r3
+ARG OPENSSH_SERVER_PACKAGE_VERSION=8.3_p1-r0
+RUN apk add --no-cache \
+    openssh-server=$OPENSSH_SERVER_PACKAGE_VERSION \
+    rrsync=$RRSYNC_PACKAGE_VERSION \
+    rsync=$RSYNC_PACKAGE_VERSION
 
 ENV SSHD_HOST_KEYS_DIR /etc/ssh/host_keys
 VOLUME $SSHD_HOST_KEYS_DIR

+ 2 - 2
README.md

@@ -23,8 +23,8 @@ $ docker run --name rsync-sshd \
     --publish 2022:22 --env USERS=alice,bob \
     --volume accessible-data:/data:ro \
     --volume host-keys:/etc/ssh/host_keys \
-    --volume alice-ssh-config:/home/alice/.ssh:ro \ 
-    --volume bob-ssh-config:/home/bob/.ssh:ro \ 
+    --volume alice-ssh-config:/home/alice/.ssh:ro \
+    --volume bob-ssh-config:/home/bob/.ssh:ro \
     --init --rm \
     fphammerle/rsync-sshd
 $ rsync -av --rsh='ssh -p 2022' alice@localhost:/source /target

+ 28 - 0
docker-compose.yml

@@ -0,0 +1,28 @@
+version: '2.2'
+
+volumes:
+  data:
+  host_keys:
+  ssh_config_alice:
+  ssh_config_bob:
+
+services:
+  sshd:
+    build: .
+    image: docker.io/fphammerle/rsync-sshd
+    container_name: rsync_sshd
+    environment:
+      USERS: alice,bob
+    volumes:
+    - data:/data:rw
+    - host_keys:/etc/ssh/host_keys:rw
+    - ssh_config_alice:/home/alice/.ssh:ro
+    - ssh_config_bob:/home/bob/.ssh:ro
+    ports:
+    - '127.0.0.1:2222:22'
+    security_opt: [no-new-privileges]
+    # docker-compose >=2.2,<3
+    cpus: 0.4
+    mem_limit: 32M
+
+# https://docs.docker.com/compose/compose-file/compose-file-v2/