-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
40 lines (34 loc) · 1.52 KB
/
Copy pathContainerfile
File metadata and controls
40 lines (34 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
ARG MICROARCH_LEVEL
FROM ghcr.io/rahilarious/gentoo:x86-64-${MICROARCH_LEVEL}
ARG BINHOST_URI
ARG PKG_NAME="net-p2p/transmission"
RUN \
--mount=type=tmpfs,tmpfs-size=100%,dst=/tmp \
--mount=type=tmpfs,tmpfs-size=100%,dst=/var/tmp \
--mount=type=tmpfs,tmpfs-size=100%,dst=/var/cache/edb \
\
if [ -n "${BINHOST_URI}" ]; then \
echo '##### Configuring binrepos.conf ######' && \
{ \
echo '[gentoo-on-steroids-binpkgserver]'; \
echo "priority=100"; \
echo "sync-uri=${BINHOST_URI}"; \
} | tee -a /etc/portage/binrepos.conf/gentoo-on-steroids.conf; \
fi && \
\
emerge -vbgk --with-bdeps=y -o --quiet-build ${PKG_NAME} && \
emerge -vBgk --with-bdeps=y --quiet-build ${PKG_NAME} && \
emerge -c && \
emerge -vKg --with-bdeps=n --quiet-build ${PKG_NAME} && \
\
mkdir -v /downloads /config && \
\
echo '############ Cleaning up #########' && \
rm -rf /var/tmp/portage && \
rm /var/log/emerge.log /var/log/portage/elog/summary.log && \
truncate -s0 /var/log/emerge* /etc/portage/binrepos.conf/gentoo-on-steroids.conf && \
\
echo '########### CONGRATULATIONS !!! EVERYTHING SUCCESSFUL #######'
EXPOSE 9091/tcp 51413/tcp 51413/udp
ENTRYPOINT [ "/usr/bin/transmission-daemon", "--foreground", "--download-dir", "/downloads", "--config-dir", "/config" ]
CMD [ "--log-level=warn", "--allowed", "172.16.*.*,192.168.*.*,10.*.*.*,127.0.0.*", "--peerlimit-global", "500", "--peerlimit-torrent", "100" ]