Skip to content

Commit

Permalink
Upgrade s6-overlay to 3.0.0.2 version
Browse files Browse the repository at this point in the history
  • Loading branch information
tyranron committed Jan 31, 2022
1 parent 3d79848 commit 5254047
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 12 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@ All user visible changes to this project will be documented in this file. This p



## [1.0.50-r1] · 2021-01-31
[1.0.50-r1]: /../../tree/1.0.50-r1

[Diff](/../../compare/1.0.50-r0...1.0.50-r1)

### Upgraded

- [s6-overlay] 3.0.0.2: <https://github.com/just-containers/s6-overlay/releases/tag/v3.0.0.2>




## [1.0.50-r0] · 2021-01-25
[1.0.50-r0]: /../../tree/1.0.50-r0

Expand Down
21 changes: 13 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
FROM alpine:3.15

ARG pure_ftpd_ver=1.0.50
ARG s6_overlay_ver=2.2.0.3
ARG build_rev=0
ARG s6_overlay_ver=3.0.0.2
ARG build_rev=1

LABEL org.opencontainers.image.source="\
https://github.com/instrumentisto/pure-ftpd-docker-image"
Expand Down Expand Up @@ -77,23 +77,28 @@ RUN apk update \
# Install s6-overlay
RUN apk add --update --no-cache --virtual .tool-deps \
curl \
&& curl -fL -o /tmp/s6-overlay.tar.gz \
https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_ver}/s6-overlay-amd64.tar.gz \
&& tar -xzf /tmp/s6-overlay.tar.gz -C / \
&& curl -fL -o /tmp/s6-overlay-noarch.tar.xz \
https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_ver}/s6-overlay-noarch-${s6_overlay_ver}.tar.xz \
&& curl -fL -o /tmp/s6-overlay-bin.tar.xz \
https://github.com/just-containers/s6-overlay/releases/download/v${s6_overlay_ver}/s6-overlay-x86_64-${s6_overlay_ver}.tar.xz \
&& tar -xf /tmp/s6-overlay-noarch.tar.xz -C / \
&& tar -xf /tmp/s6-overlay-bin.tar.xz -C / \
&& which syslogd \
\
# Cleanup unnecessary stuff
&& apk del .tool-deps \
&& rm -rf /var/cache/apk/* \
/tmp/*

ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
ENV S6_KEEP_ENV=1 \
S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
S6_CMD_WAIT_FOR_SERVICES=1


COPY rootfs /

RUN chmod +x /etc/services.d/*/run \
/etc/cont-init.d/*
RUN chmod +x /etc/s6-overlay/s6-rc.d/*/run \
/etc/s6-overlay/s6-rc.d/*/*.sh


EXPOSE 21 30000-30009
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Pure-FTPd Docker image

## Supported tags and respective `Dockerfile` links

- [`1.0.50-r0`, `1.0.50`, `1.0`, `1`, `latest`][201]
- [`1.0.50-r1`, `1.0.50`, `1.0`, `1`, `latest`][201]



Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/create-puredb/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/create-puredb/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/create-puredb/run.sh
5 changes: 5 additions & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/syslog/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

set -e

exec /sbin/syslogd -n
1 change: 1 addition & 0 deletions rootfs/etc/s6-overlay/s6-rc.d/syslog/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.
3 changes: 0 additions & 3 deletions rootfs/etc/services.d/syslog/run

This file was deleted.

9 changes: 9 additions & 0 deletions tests/main.bats
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,12 @@
$IMAGE test -f /etc/pureftpd.pdb
[ "$status" -eq 0 ]
}

@test "PURE_PASSWDFILE is converted to PURE_DBFILE from custom location" {
run docker run --rm \
-e PURE_PASSWDFILE=/tmp/pureftpd.passwd \
-e PURE_DBFILE=/pureftpd.pdb \
-v $(pwd)/tests/resources/pureftpd.passwd:/tmp/pureftpd.passwd:ro \
$IMAGE test -f /pureftpd.pdb
[ "$status" -eq 0 ]
}

0 comments on commit 5254047

Please sign in to comment.