first commit
This commit is contained in:
23
docker/Dockerfile
Normal file
23
docker/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM debian:testing-slim
|
||||
|
||||
SHELL [ "/bin/sh", "-eux", "-c" ]
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends yggdrasil wget ca-certificates unzip libcap2-bin gosu ;\
|
||||
apt-get clean ;\
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN PU_VERSION="$(wget --server-response https://github.com/ygguser/peers_updater/releases/latest 2>&1 \
|
||||
| grep -E -m1 'Location: ' \
|
||||
| cut -d'/' -f8)" ;\
|
||||
wget https://github.com/ygguser/peers_updater/releases/download/$PU_VERSION/x86_64-unknown-linux-gnu.zip ;\
|
||||
unzip -d /usr/local/bin/ x86_64-unknown-linux-gnu.zip ;\
|
||||
rm x86_64-unknown-linux-gnu.zip
|
||||
|
||||
# Set file capability to run as regular user
|
||||
RUN setcap cap_net_admin=eip /usr/sbin/yggdrasil
|
||||
|
||||
COPY ./run.sh /usr/local/bin/run.sh
|
||||
|
||||
CMD ["/usr/local/bin/run.sh"]
|
||||
|
||||
Reference in New Issue
Block a user