tor/Dockerfile
2022-10-07 18:48:24 -04:00

54 lines
1.5 KiB
Docker

FROM casjaysdevdocker/nginx:latest as build
ARG LICENSE=WTFPL \
IMAGE_NAME=tor \
TIMEZONE=America/New_York \
PORT="80 9053 9050 9080"
ENV SHELL=/bin/bash \
TERM=xterm-256color \
HOSTNAME=${HOSTNAME:-casjaysdev-$IMAGE_NAME} \
TZ=$TIMEZONE
RUN mkdir -p /bin/ /config/ /data/ && \
rm -Rf /bin/.gitkeep /config/.gitkeep /data/.gitkeep && \
apk update -U --no-cache && \
apk add --no-cache tor
COPY ./bin/. /usr/local/bin/
COPY ./config/. /etc/
COPY ./data/. /data/
FROM scratch
ARG BUILD_DATE="$(date +'%Y-%m-%d %H:%M')"
LABEL org.label-schema.name="tor" \
org.label-schema.description="Containerized version of tor" \
org.label-schema.url="https://hub.docker.com/r/casjaysdevdocker/tor" \
org.label-schema.vcs-url="https://github.com/casjaysdevdocker/tor" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.version=$BUILD_DATE \
org.label-schema.vcs-ref=$BUILD_DATE \
org.label-schema.license="$LICENSE" \
org.label-schema.vcs-type="Git" \
org.label-schema.schema-version="latest" \
org.label-schema.vendor="CasjaysDev" \
maintainer="CasjaysDev <docker-admin@casjaysdev.com>"
ENV SHELL="/bin/bash" \
TERM="xterm-256color" \
HOSTNAME="casjaysdev-tor" \
TZ="${TZ:-America/New_York}"
WORKDIR /root
VOLUME ["/config","/data"]
EXPOSE $PORT
COPY --from=build /. /
ENTRYPOINT [ "tini", "--" ]
HEALTHCHECK --interval=15s --timeout=3s CMD [ "/usr/local/bin/entrypoint-tor.sh", "healthcheck" ]
CMD [ "/usr/local/bin/entrypoint-tor.sh" ]