Updated base to swarupsengupta2007/alpine-s6
This commit is contained in:
+4
-5
@@ -29,13 +29,12 @@ RUN TARGET_PALTFORMS=${TARGETS:-"$BUILDOS/$BUILDARCH"} &&
|
|||||||
mv ${BINARY} /go/psiphon_${OS}_${ARCH}_${TARGETVARIANT}; \
|
mv ${BINARY} /go/psiphon_${OS}_${ARCH}_${TARGETVARIANT}; \
|
||||||
done)
|
done)
|
||||||
|
|
||||||
FROM alpine:3.16.0
|
FROM swarupsengupta2007/alpine-s6:3.16.0
|
||||||
RUN mkdir -p /psiphon /config
|
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG TARGETVARIANT
|
ARG TARGETVARIANT
|
||||||
COPY start_psiphon psiphon.config /psiphon/
|
COPY base/ /
|
||||||
COPY --from=psiphon_builder /go/psiphon_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT} /psiphon/psiphon
|
COPY psiphon.config ${DEF_DEFAULTS}
|
||||||
|
COPY --from=psiphon_builder /go/psiphon_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT} ${DEF_APP}/psiphon
|
||||||
EXPOSE 8080 1080
|
EXPOSE 8080 1080
|
||||||
VOLUME /config
|
VOLUME /config
|
||||||
CMD ["/bin/sh", "/psiphon/start_psiphon"]
|
|
||||||
|
|||||||
@@ -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 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
|
```bash
|
||||||
# Clone this repo
|
# Clone this repo
|
||||||
git clone https://github.com/swarupsengupta2007/psiphon-docker
|
git clone https://github.com/swarupsengupta2007/psiphon-docker
|
||||||
|
|||||||
Executable
+6
@@ -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
|
||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user