├── .github
├── dependabot.yml
└── workflows
│ └── image.yml
├── .mailmap
├── 1.6
├── Dockerfile
├── alpine
│ ├── Dockerfile
│ ├── docker-entrypoint.sh
│ └── spiped-generate-key.sh
├── docker-entrypoint.sh
└── spiped-generate-key.sh
├── README.md
└── generate-stackbrew-library.sh
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "monthly"
7 |
--------------------------------------------------------------------------------
/.github/workflows/image.yml:
--------------------------------------------------------------------------------
1 | name: Build Docker Image
2 |
3 | on:
4 | - push
5 | - pull_request
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | strategy:
11 | matrix:
12 | variant:
13 | - "1.6"
14 | - "1.6/alpine"
15 | steps:
16 | - uses: actions/checkout@v4
17 | - name: Build the image.
18 | id: build
19 | run: |
20 | set -euo pipefail
21 | printf "::group::Sending context\n"
22 | IMAGE=spiped:${VARIANT/\//-}-$(date +%s)
23 | docker build "$VARIANT" --tag "$IMAGE" |sed 's/^Step/::endgroup::\n::group::Step/'
24 | printf "::endgroup::\n"
25 | printf "%s=%s\n" "image" "$IMAGE" >> $GITHUB_OUTPUT
26 | env:
27 | VARIANT: ${{ matrix.variant }}
28 | - name: Generate Keyfile.
29 | run: docker run --name spiped_generate_key -v $(pwd):/spiped/key ${{ steps.build.outputs.image }} spiped-generate-key.sh
30 | - name: Start the decrypting spiped.
31 | run: docker run --name spiped_test_d -d -v $(pwd)/spiped-keyfile:/spiped/key:ro ${{ steps.build.outputs.image }} -d -s '[0.0.0.0]:8080' -t 'example.com:80'
32 | - name: Start the encrypting spiped.
33 | run: docker run --name spiped_test_e -d -v $(pwd)/spiped-keyfile:/spiped/key:ro -p 80:80 --link spiped_test_d:spiped_test_d ${{ steps.build.outputs.image }} -e -s '[0.0.0.0]:80' -t 'spiped_test_d:8080'
34 | - name: Send request through spiped.
35 | run: |
36 | set -euo pipefail
37 | docker run --name spiped_test_curl --link spiped_test_e:spiped_test_e buildpack-deps:curl curl -v -fsSL --connect-to '::spiped_test_e:' http://example.com |grep '
Example Domain
'
38 | - name: Show Containers and Images
39 | run: |
40 | printf "::group::docker ps -a\n"
41 | docker ps -a
42 | printf "::endgroup::\n"
43 | printf "::group::docker images\n"
44 | docker images
45 | printf "::endgroup::\n"
46 |
--------------------------------------------------------------------------------
/.mailmap:
--------------------------------------------------------------------------------
1 | Tim Düsterhus
2 |
--------------------------------------------------------------------------------
/1.6/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM debian:bookworm-slim
2 |
3 | RUN set -x \
4 | && groupadd -r spiped \
5 | && useradd -r -g spiped spiped
6 |
7 | RUN export DEBIAN_FRONTEND="noninteractive" \
8 | && set -x \
9 | && apt-get update \
10 | && apt-get install -y libssl3 --no-install-recommends \
11 | && rm -rf /var/lib/apt/lists/*
12 |
13 | ENV SPIPED_VERSION=1.6.4 SPIPED_DOWNLOAD_SHA256=424fb4d3769d912b04de43d21cc32748cdfd3121c4f1d26d549992a54678e06a
14 |
15 | RUN export DEBIAN_FRONTEND="noninteractive" \
16 | && set -x \
17 | && buildDeps='libssl-dev libc-dev gcc make curl ca-certificates' \
18 | && apt-get update \
19 | && apt-get install -y $buildDeps --no-install-recommends \
20 | && rm -rf /var/lib/apt/lists/* \
21 | && curl -fsSL "https://www.tarsnap.com/spiped/spiped-$SPIPED_VERSION.tgz" -o spiped.tar.gz \
22 | && echo "$SPIPED_DOWNLOAD_SHA256 *spiped.tar.gz" |sha256sum -c - \
23 | && mkdir -p /usr/local/src/spiped \
24 | && tar xzf "spiped.tar.gz" -C /usr/local/src/spiped --strip-components=1 \
25 | && rm "spiped.tar.gz" \
26 | && CC=gcc make -C /usr/local/src/spiped \
27 | && make -C /usr/local/src/spiped install \
28 | && rm -rf /usr/local/src/spiped \
29 | && apt-get purge -y --auto-remove $buildDeps
30 |
31 | VOLUME /spiped
32 | WORKDIR /spiped
33 |
34 | COPY *.sh /usr/local/bin/
35 | ENTRYPOINT ["docker-entrypoint.sh"]
36 |
37 | CMD ["spiped"]
38 |
--------------------------------------------------------------------------------
/1.6/alpine/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM alpine:3.21
2 |
3 | RUN set -x \
4 | && addgroup -S spiped \
5 | && adduser -S -G spiped spiped
6 |
7 | RUN apk add --no-cache libssl3
8 |
9 | ENV SPIPED_VERSION=1.6.4 SPIPED_DOWNLOAD_SHA256=424fb4d3769d912b04de43d21cc32748cdfd3121c4f1d26d549992a54678e06a
10 |
11 | RUN set -x \
12 | && apk add --no-cache --virtual .build-deps \
13 | curl \
14 | gcc \
15 | make \
16 | musl-dev \
17 | openssl-dev \
18 | tar \
19 | && curl -fsSL "https://www.tarsnap.com/spiped/spiped-$SPIPED_VERSION.tgz" -o spiped.tar.gz \
20 | && echo "$SPIPED_DOWNLOAD_SHA256 *spiped.tar.gz" |sha256sum -c - \
21 | && mkdir -p /usr/local/src/spiped \
22 | && tar xzf "spiped.tar.gz" -C /usr/local/src/spiped --strip-components=1 \
23 | && rm "spiped.tar.gz" \
24 | && CC=gcc make -C /usr/local/src/spiped \
25 | && make -C /usr/local/src/spiped install \
26 | && rm -rf /usr/local/src/spiped \
27 | && apk del --no-network .build-deps
28 |
29 | VOLUME /spiped
30 | WORKDIR /spiped
31 |
32 | COPY *.sh /usr/local/bin/
33 | ENTRYPOINT ["docker-entrypoint.sh"]
34 |
35 | CMD ["spiped"]
36 |
--------------------------------------------------------------------------------
/1.6/alpine/docker-entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | case "$1" in
5 | -*) set -- spiped -k /spiped/key -F "$@" ;;
6 | esac
7 |
8 | exec "$@"
9 |
--------------------------------------------------------------------------------
/1.6/alpine/spiped-generate-key.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | umask 0077
3 | dd if=/dev/urandom bs=32 count=1 of=/spiped/key/spiped-keyfile
4 |
--------------------------------------------------------------------------------
/1.6/docker-entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | set -e
3 |
4 | case "$1" in
5 | -*) set -- spiped -k /spiped/key -F "$@" ;;
6 | esac
7 |
8 | exec "$@"
9 |
--------------------------------------------------------------------------------
/1.6/spiped-generate-key.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | umask 0077
3 | dd if=/dev/urandom bs=32 count=1 of=/spiped/key/spiped-keyfile
4 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # https://github.com/TimWolla/docker-spiped
2 |
3 | ## Maintained by: [Tim Düsterhus (of the Docker Community)](https://github.com/TimWolla/docker-spiped), [with Colin's support (from spiped upstream)](https://github.com/docker-library/official-images/pull/1714#issuecomment-219556607)
4 |
5 | This is the Git repo of the [Docker "Official Image"](https://github.com/docker-library/official-images#what-are-official-images) for [`spiped`](https://hub.docker.com/_/spiped/) (not to be confused with any official `spiped` image provided by `spiped` upstream). See [the Docker Hub page](https://hub.docker.com/_/spiped/) for the full readme on how to use this Docker image and for information regarding contributing and issues.
6 |
7 | The [full image description on Docker Hub](https://hub.docker.com/_/spiped/) is generated/maintained over in [the docker-library/docs repository](https://github.com/docker-library/docs), specifically in [the `spiped` directory](https://github.com/docker-library/docs/tree/master/spiped).
8 |
9 | ## See a change merged here that doesn't show up on Docker Hub yet?
10 |
11 | For more information about the full official images change lifecycle, see [the "An image's source changed in Git, now what?" FAQ entry](https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what).
12 |
13 | For outstanding `spiped` image PRs, check [PRs with the "library/spiped" label on the official-images repository](https://github.com/docker-library/official-images/labels/library%2Fspiped). For the current "source of truth" for [`spiped`](https://hub.docker.com/_/spiped/), see [the `library/spiped` file in the official-images repository](https://github.com/docker-library/official-images/blob/master/library/spiped).
14 |
--------------------------------------------------------------------------------
/generate-stackbrew-library.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -eu
3 |
4 | declare -A aliases=(
5 | [1.6]='1 latest'
6 | )
7 |
8 | self="$(basename "$BASH_SOURCE")"
9 | cd "$(dirname "$(readlink -f "$BASH_SOURCE")")"
10 |
11 | versions=( */ )
12 | versions=( "${versions[@]%/}" )
13 |
14 | # get the most recent commit which modified any of "$@"
15 | fileCommit() {
16 | git log -1 --format='format:%H' HEAD -- "$@"
17 | }
18 |
19 | # get the most recent commit which modified "$1/Dockerfile" or any file COPY'd from "$1/Dockerfile"
20 | dirCommit() {
21 | local dir="$1"; shift
22 | (
23 | cd "$dir"
24 | fileCommit \
25 | Dockerfile \
26 | $(git show HEAD:./Dockerfile | awk '
27 | toupper($1) == "COPY" {
28 | for (i = 2; i < NF; i++) {
29 | print $i
30 | }
31 | }
32 | ')
33 | )
34 | }
35 |
36 | getArches() {
37 | local repo="$1"; shift
38 | local officialImagesUrl='https://github.com/docker-library/official-images/raw/master/library/'
39 |
40 | eval "declare -g -A parentRepoToArches=( $(
41 | find -name 'Dockerfile' -exec awk '
42 | toupper($1) == "FROM" && $2 !~ /^('"$repo"'|scratch|microsoft\/[^:]+)(:|$)/ {
43 | print "'"$officialImagesUrl"'" $2
44 | }
45 | ' '{}' + \
46 | | sort -u \
47 | | xargs bashbrew cat --format '[{{ .RepoName }}:{{ .TagName }}]="{{ join " " .TagEntry.Architectures }}"'
48 | ) )"
49 | }
50 | getArches 'spiped'
51 |
52 | cat <<-EOH
53 | # this file is generated via https://github.com/TimWolla/docker-spiped/blob/$(fileCommit "$self")/$self
54 |
55 | Maintainers: Tim Düsterhus (@TimWolla)
56 | GitRepo: https://github.com/TimWolla/docker-spiped.git
57 | GitFetch: refs/heads/main
58 | EOH
59 |
60 | # prints "$2$1$3$1...$N"
61 | join() {
62 | local sep="$1"; shift
63 | local out; printf -v out "${sep//%/%%}%s" "$@"
64 | echo "${out#$sep}"
65 | }
66 |
67 | for version in "${versions[@]}"; do
68 | commit="$(dirCommit "$version")"
69 |
70 | fullVersion="$(git show "$commit":"$version/Dockerfile" | awk '$1 == "ENV" { for(i = 2; i <= NF; i++) { if ($i ~ /^SPIPED_VERSION/) { split($i,kv,/=/); print kv[2]; exit } } }')"
71 |
72 | versionAliases=(
73 | $fullVersion
74 | $version
75 | ${aliases[$version]:-}
76 | )
77 |
78 | parent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/Dockerfile")"
79 | arches="${parentRepoToArches[$parent]}"
80 |
81 | echo
82 | cat <<-EOE
83 | Tags: $(join ', ' "${versionAliases[@]}")
84 | Architectures: $(join ', ' $arches)
85 | GitCommit: $commit
86 | Directory: $version
87 | EOE
88 |
89 | for variant in alpine; do
90 | [ -f "$version/$variant/Dockerfile" ] || continue
91 |
92 | commit="$(dirCommit "$version/$variant")"
93 |
94 | variantAliases=( "${versionAliases[@]/%/-$variant}" )
95 | variantAliases=( "${variantAliases[@]//latest-/}" )
96 |
97 | variantParent="$(awk 'toupper($1) == "FROM" { print $2 }' "$version/$variant/Dockerfile")"
98 | variantArches="${parentRepoToArches[$variantParent]}"
99 |
100 | echo
101 | cat <<-EOE
102 | Tags: $(join ', ' "${variantAliases[@]}")
103 | Architectures: $(join ', ' $variantArches)
104 | GitCommit: $commit
105 | Directory: $version/$variant
106 | EOE
107 | done
108 | done
109 |
--------------------------------------------------------------------------------