🗃️ Committing everything that changed 🗃️
Some checks failed
release-tag / release-image (push) Failing after 11m52s

Dockerfile
.env.scripts
.gitattributes
.gitignore
rootfs/.gitea/
rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/share/
This commit is contained in:
casjay
2025-09-16 19:38:50 -04:00
parent 98822a3bc2
commit 620dec89a1
30 changed files with 976 additions and 368 deletions

View File

@@ -1,7 +1,7 @@
# Docker image for tor using the alpine template
ARG IMAGE_NAME="tor"
ARG PHP_SERVER="tor"
ARG BUILD_DATE="202501060852"
ARG BUILD_DATE="202509161150"
ARG LANGUAGE="en_US.UTF-8"
ARG TIMEZONE="America/New_York"
ARG WWW_ROOT_DIR="/usr/local/share/httpd/default"
@@ -15,7 +15,7 @@ ARG USER="root"
ARG SHELL_OPTS="set -e -o pipefail"
ARG SERVICE_PORT="80"
ARG EXPOSE_PORTS="80 8118 9040 9050 9053 9080 57000-57010"
ARG EXPOSE_PORTS="80 9053 9050 9080"
ARG PHP_VERSION="84"
ARG NODE_VERSION="system"
ARG NODE_MANAGER="system"
@@ -54,7 +54,7 @@ ARG PHP_SERVER
ARG SHELL_OPTS
ARG PATH
ARG PACK_LIST="tor torsocks lyrebird privoxy nginx socat unbound bind-tools php$PHP_VERSION"
ARG PACK_LIST="tor torsocks nginx php84 "
ENV ENV=~/.profile
ENV SHELL="/bin/sh"
@@ -70,7 +70,8 @@ WORKDIR /root
COPY ./rootfs/usr/local/bin/. /usr/local/bin/
RUN echo "Updating the system and ensuring bash is installed"; \
RUN set -e; \
echo "Updating the system and ensuring bash is installed"; \
pkmgr update;pkmgr install bash
RUN set -e; \
@@ -81,7 +82,6 @@ ENV SHELL="/bin/bash"
SHELL [ "/bin/bash", "-c" ]
COPY --from=gosu /usr/local/bin/gosu /usr/local/bin/gosu
COPY --from=thetorproject/snowflake-proxy:latest /bin/proxy /usr/local/bin/snowflake
RUN echo "Initializing the system"; \
$SHELL_OPTS; \
@@ -129,14 +129,14 @@ RUN echo "Updating system files "; \
if [ -f "/etc/profile.d/color_prompt.sh.disabled" ]; then mv -f "/etc/profile.d/color_prompt.sh.disabled" "/etc/profile.d/color_prompt.sh";fi ; \
{ [ -f "/etc/bash/bashrc" ] && cp -Rf "/etc/bash/bashrc" "/root/.bashrc"; } || { [ -f "/etc/bashrc" ] && cp -Rf "/etc/bashrc" "/root/.bashrc"; } || { [ -f "/etc/bash.bashrc" ] && cp -Rf "/etc/bash.bashrc" "/root/.bashrc"; } || true; \
if [ -z "$(command -v "apt-get" 2>/dev/null)" ];then grep -sh -q 'alias quit' "/root/.bashrc" || printf '# Profile\n\n%s\n%s\n%s\n' '. /etc/profile' '. /root/.profile' "alias quit='exit 0 2>/dev/null'" >>"/root/.bashrc"; fi; \
if [ "$PHP_VERSION" != "system" ] && [ -e "/etc/php" ] && [ -d "/etc/php${PHP_VERSION}" ];then rm -Rf "/etc/php";fi; \
if [ "$PHP_VERSION" != "system" ] && [ -n "${PHP_VERSION}" ] && [ -d "/etc/php${PHP_VERSION}" ];then ln -sf "/etc/php${PHP_VERSION}" "/etc/php";fi; \
if [ "$PHP_VERSION" != "system" ] && [ -e "/etc/php" ] && [ -d "/etc/${PHP_VERSION}" ];then rm -Rf "/etc/php";fi; \
if [ "$PHP_VERSION" != "system" ] && [ -n "${PHP_VERSION}" ] && [ -d "/etc/${PHP_VERSION}" ];then ln -sf "/etc/${PHP_VERSION}" "/etc/php";fi; \
if [ -f "/root/docker/setup/03-files.sh" ];then echo "Running the files script";/root/docker/setup/03-files.sh||{ echo "Failed to execute /root/docker/setup/03-files.sh" >&2 && exit 10; };echo "Done running the files script";fi; \
echo ""
RUN echo "Custom Settings"; \
$SHELL_OPTS; \
echo ""
echo ""
RUN echo "Setting up users and scripts "; \
$SHELL_OPTS; \
@@ -153,7 +153,7 @@ RUN echo "Setting OS Settings "; \
RUN echo "Custom Applications"; \
$SHELL_OPTS; \
echo ""
echo ""
RUN echo "Running custom commands"; \
if [ -f "/root/docker/setup/05-custom.sh" ];then echo "Running the custom script";/root/docker/setup/05-custom.sh||{ echo "Failed to execute /root/docker/setup/05-custom.sh" && exit 10; };echo "Done running the custom script";fi; \
@@ -167,7 +167,6 @@ RUN echo "Running final commands before cleanup"; \
RUN echo "Deleting unneeded files"; \
$SHELL_OPTS; \
pkmgr clean; \
rm -Rf /etc/tor/*.sample || true; \
rm -Rf "/config" "/data" || true; \
rm -rf /etc/systemd/system/*.wants/* || true; \
rm -rf /lib/systemd/system/systemd-update-utmp* || true; \
@@ -220,8 +219,8 @@ LABEL org.opencontainers.image.authors="${LICENSE}"
LABEL org.opencontainers.image.created="${BUILD_DATE}"
LABEL org.opencontainers.image.version="${BUILD_VERSION}"
LABEL org.opencontainers.image.schema-version="${BUILD_VERSION}"
LABEL org.opencontainers.image.url="https://hub.docker.com/r/casjaysdevdocker/tor"
LABEL org.opencontainers.image.source="https://hub.docker.com/r/casjaysdevdocker/tor"
LABEL org.opencontainers.image.url="docker.io"
LABEL org.opencontainers.image.source="docker.io"
LABEL org.opencontainers.image.vcs-type="Git"
LABEL org.opencontainers.image.revision="${BUILD_VERSION}"
LABEL org.opencontainers.image.source="https://github.com/casjaysdevdocker/tor"
@@ -253,5 +252,5 @@ VOLUME [ "/config","/data" ]
EXPOSE ${SERVICE_PORT} ${ENV_PORTS}
ENTRYPOINT [ "tini","--","/usr/local/bin/entrypoint.sh" ]
ENTRYPOINT [ "tini","--","/usr/local/bin/entrypoint.sh" "start" ]
HEALTHCHECK --start-period=10m --interval=5m --timeout=15s CMD [ "/usr/local/bin/entrypoint.sh", "healthcheck" ]