Skip to content

Commit

Permalink
add clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
magicxor committed Mar 23, 2024
1 parent c42db96 commit a26ccd9
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ubuntu_lts_repo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ ARG VERSION

RUN apt-get update && \
apt-get install -y curl tor tor-geoipdb obfs4proxy && \
# cleanup
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
# check versions
tor_version=$(apt-cache madison tor | awk '{print $3; exit}') && \
obfs4proxy_version=$(apt-cache madison obfs4proxy | awk '{print $3; exit}') && \
ubuntu_version=$(cat /etc/os-release | grep VERSION_ID | awk -F '"' '{print $2}') && \
Expand Down
5 changes: 5 additions & 0 deletions ubuntu_rolling_sources/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,14 @@ RUN apt-get update && \
cp obfs4proxy /usr/bin/obfs4proxy && \
chmod +x /usr/bin/obfs4proxy && \
# cleanup
go clean -modcache -cache -testcache -fuzzcache && \
rm -rf ~/go && \
rm -rf ~/.cache && \
apt-get remove -y golang git build-essential automake libevent-dev libssl-dev zlib1g-dev && \
apt-get autoremove -y && \
apt-get install -y libc6 libcap2 libevent-dev liblzma5 libseccomp2 libssl3 libsystemd0 libzstd1 zlib1g adduser lsb-base && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf ~/git && \
# check versions
ubuntu_version=$(cat /etc/os-release | grep VERSION_ID | awk -F '"' '{print $2}') && \
Expand Down
11 changes: 11 additions & 0 deletions ubuntu_rolling_sources/VersionInfo.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,35 @@ FROM ubuntu:rolling
RUN apt-get update && \
apt-get install -y git && \
mkdir -p ~/git && \
# get tor
cd ~/git && \
git clone https://gitlab.torproject.org/tpo/core/tor.git && \
cd ~/git/tor && \
git fetch --tags && \
torLatestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") && \
# get webtunnel
cd ~/git && \
git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel.git && \
cd ~/git/webtunnel/main/client && \
webtunnelCommitHash=$(git rev-parse --short HEAD) && \
# get snowflake
cd ~/git && \
git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git && \
cd ~/git/snowflake/ && \
snowflakeCommitHash=$(git rev-parse --short HEAD) && \
# get obfs4proxy
cd ~/git && \
git clone https://gitlab.com/yawning/obfs4.git && \
cd ~/git/obfs4 && \
git fetch --tags && \
obfs4LatestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") && \
# cleanup
apt-get remove -y git && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf ~/git && \
# write version info
ubuntu_version=$(cat /etc/os-release | grep VERSION_ID | awk -F '"' '{print $2}') && \
torLatestTag=$(echo $torLatestTag | sed 's/.*-//') && \
obfs4LatestTag=$(echo $obfs4LatestTag | sed 's/.*-//') && \
Expand Down

0 comments on commit a26ccd9

Please sign in to comment.