Skip to content

Commit a26ccd9

Browse files
committed
add clean-up
1 parent c42db96 commit a26ccd9

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

ubuntu_lts_repo/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ ARG VERSION
77

88
RUN apt-get update && \
99
apt-get install -y curl tor tor-geoipdb obfs4proxy && \
10+
# cleanup
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/* && \
13+
# check versions
1014
tor_version=$(apt-cache madison tor | awk '{print $3; exit}') && \
1115
obfs4proxy_version=$(apt-cache madison obfs4proxy | awk '{print $3; exit}') && \
1216
ubuntu_version=$(cat /etc/os-release | grep VERSION_ID | awk -F '"' '{print $2}') && \

ubuntu_rolling_sources/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,14 @@ RUN apt-get update && \
5454
cp obfs4proxy /usr/bin/obfs4proxy && \
5555
chmod +x /usr/bin/obfs4proxy && \
5656
# cleanup
57+
go clean -modcache -cache -testcache -fuzzcache && \
58+
rm -rf ~/go && \
59+
rm -rf ~/.cache && \
5760
apt-get remove -y golang git build-essential automake libevent-dev libssl-dev zlib1g-dev && \
5861
apt-get autoremove -y && \
5962
apt-get install -y libc6 libcap2 libevent-dev liblzma5 libseccomp2 libssl3 libsystemd0 libzstd1 zlib1g adduser lsb-base && \
63+
apt-get clean && \
64+
rm -rf /var/lib/apt/lists/* && \
6065
rm -rf ~/git && \
6166
# check versions
6267
ubuntu_version=$(cat /etc/os-release | grep VERSION_ID | awk -F '"' '{print $2}') && \

ubuntu_rolling_sources/VersionInfo.Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,35 @@ FROM ubuntu:rolling
55
RUN apt-get update && \
66
apt-get install -y git && \
77
mkdir -p ~/git && \
8+
# get tor
89
cd ~/git && \
910
git clone https://gitlab.torproject.org/tpo/core/tor.git && \
1011
cd ~/git/tor && \
1112
git fetch --tags && \
1213
torLatestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") && \
14+
# get webtunnel
1315
cd ~/git && \
1416
git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/webtunnel.git && \
1517
cd ~/git/webtunnel/main/client && \
1618
webtunnelCommitHash=$(git rev-parse --short HEAD) && \
19+
# get snowflake
1720
cd ~/git && \
1821
git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git && \
1922
cd ~/git/snowflake/ && \
2023
snowflakeCommitHash=$(git rev-parse --short HEAD) && \
24+
# get obfs4proxy
2125
cd ~/git && \
2226
git clone https://gitlab.com/yawning/obfs4.git && \
2327
cd ~/git/obfs4 && \
2428
git fetch --tags && \
2529
obfs4LatestTag=$(git describe --tags "$(git rev-list --tags --max-count=1)") && \
30+
# cleanup
31+
apt-get remove -y git && \
32+
apt-get autoremove -y && \
33+
apt-get clean && \
34+
rm -rf /var/lib/apt/lists/* && \
35+
rm -rf ~/git && \
36+
# write version info
2637
ubuntu_version=$(cat /etc/os-release | grep VERSION_ID | awk -F '"' '{print $2}') && \
2738
torLatestTag=$(echo $torLatestTag | sed 's/.*-//') && \
2839
obfs4LatestTag=$(echo $obfs4LatestTag | sed 's/.*-//') && \

0 commit comments

Comments
 (0)