-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
191 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,14 +17,32 @@ RUN sh ./build/binary.sh $TARGETPLATFORM \ | |
############################ | ||
# STEP 2 build a small image | ||
############################ | ||
FROM alpine:3.12 | ||
FROM alpine:3.13 | ||
|
||
LABEL maintainer "WaybackBot <[email protected]>" | ||
COPY --from=builder /wayback /usr/local/bin | ||
RUN apk update && apk add ca-certificates tor | ||
RUN mv /etc/tor/torrc.sample /etc/tor/torrc | ||
RUN echo 'ExcludeNodes {cn},{hk},{mo},{sg},{th},{pk},{by},{ru},{ir},{sy},{vn},{ph},{my},{cu},{us},{au},{ca},{nz},{gb},{fr}' >> /etc/tor/torrc | ||
RUN echo 'ExcludeExitNodes {cn},{hk},{mo},{sg},{th},{pk},{by},{ru},{ir},{sy},{vn},{ph},{my},{cu},{us},{au},{ca},{nz},{gb},{fr}' >> /etc/tor/torrc | ||
RUN echo 'StrictNodes 1' >> /etc/tor/torrc | ||
|
||
RUN rm -rf /var/cache/apk/* | ||
ARG TOR_EXCLUDE_NODE="{cn},{hk},{mo},{sg},{th},{pk},{by},{ru},{ir},{sy},{vn},{ph},{my},{cu},{us},{au},{ca},{nz},{gb},{fr}" | ||
|
||
ENV BASE_DIR /wayback | ||
ENV PUSER wayback | ||
ENV PGROUP wayback | ||
|
||
WORKDIR $BASE_DIR | ||
|
||
RUN set -eux; \ | ||
addgroup --system ${PGROUP}; \ | ||
adduser --system --no-create-home --disabled-password \ | ||
--gecos '' --home ${BASE_DIR} --ingroup ${PGROUP} ${PUSER}; \ | ||
chown -R ${PUSER}:${PGROUP} "${BASE_DIR}"; \ | ||
chmod -R g+w "${BASE_DIR}" | ||
|
||
COPY --from=builder /wayback /usr/local/bin | ||
RUN apk update; \ | ||
apk add --no-cache ca-certificates tor; \ | ||
rm -rf /var/cache/apk/*; \ | ||
\ | ||
mv /etc/tor/torrc.sample /etc/tor/torrc; \ | ||
echo "ExcludeNodes ${TOR_EXCLUDE_NODE}" >> /etc/tor/torrc; \ | ||
echo "ExcludeExitNodes ${TOR_EXCLUDE_NODE}" >> /etc/tor/torrc; \ | ||
echo 'StrictNodes 1' >> /etc/tor/torrc; \ | ||
#echo 'User tor' >> /etc/tor/torrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.