Updated base to swarupsengupta2007/alpine-s6

This commit is contained in:
Swarup Sengupta
2022-06-23 16:14:38 +05:30
parent b2432da543
commit 7666b6e78e
4 changed files with 12 additions and 22 deletions
+4 -5
View File
@@ -29,13 +29,12 @@ RUN TARGET_PALTFORMS=${TARGETS:-"$BUILDOS/$BUILDARCH"} &&
mv ${BINARY} /go/psiphon_${OS}_${ARCH}_${TARGETVARIANT}; \
done)
FROM alpine:3.16.0
RUN mkdir -p /psiphon /config
FROM swarupsengupta2007/alpine-s6:3.16.0
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
COPY start_psiphon psiphon.config /psiphon/
COPY --from=psiphon_builder /go/psiphon_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT} /psiphon/psiphon
COPY base/ /
COPY psiphon.config ${DEF_DEFAULTS}
COPY --from=psiphon_builder /go/psiphon_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT} ${DEF_APP}/psiphon
EXPOSE 8080 1080
VOLUME /config
CMD ["/bin/sh", "/psiphon/start_psiphon"]
+2
View File
@@ -7,6 +7,8 @@ This docker image runs the ConsoleClient from the [psiphon-tunnel-core](https://
This build uses `docker buildx` plugin with `docker-container` driver.
This is built on base image from [swarupsengupta2007/apine-s6-docker](https://github.com/swarupsengupta2007/alpine-s6-docker "swarupsengupta2007/apine-s6-docker")
```bash
# Clone this repo
git clone https://github.com/swarupsengupta2007/psiphon-docker
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/with-contenv sh
[[ ! -f ${DEF_CONFIG}/psiphon.config ]] && cp ${DEF_DEFAULTS}/psiphon.config ${DEF_CONFIG}/
[[ ! -d ${DEF_CONFIG}/osl ]] && mkdir ${DEF_CONFIG}/osl
[[ ! -d ${DEF_CONFIG}/remote_server_list ]] && mkdir ${DEF_CONFIG}/remote_server_list
exec s6-setuidgid ${DEF_USER} ${DEF_APP}/psiphon -config ${DEF_CONFIG}/psiphon.config
-17
View File
@@ -1,17 +0,0 @@
#/bin/sh
export EUID=${PUID:-1000}
export EGID=${PGID:-1000}
if id psi > /dev/null
then
addgroup -g $EGID psi
adduser -u $EUID -G psi -D -H psi
fi
[[ ! -f /config/psiphon.config ]] && cp /psiphon/psiphon.config /config/
[[ ! -d /config/osl ]] && mkdir /config/osl
[[ ! -d /config/remote_server_list ]] && mkdir /config/remote_server_list
chown -R psi:psi /config/
exec /psiphon/psiphon -config /config/psiphon.config