Docker fixes

This commit is contained in:
Illya Marchenko 2021-10-18 02:03:44 +03:00
parent 1e13cb5d86
commit 7cd14e3a85
2 changed files with 9 additions and 9 deletions

@ -25,15 +25,15 @@ RUN apt-get update && apt-get install -y \
&& make -j4 \
&& make install \
&& rm /app/source \
&& cp /app/conf/examples/example.conf /app/conf/unrealircd.conf \
&& rm -rf /opt/unrealircd \
&& cd /app \
&& useradd unrealircd \
&& chown unrealircd:unrealircd -R /app \
&& ldd /app/bin/unrealircd | tr -s '[:blank:]' '\n' | grep '^/' | xargs -I % sh -c 'mkdir -p $(dirname /app/deps%); cp % /app/deps%;' \
&& apt purge --yes git build-essential pkg-config libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev \
&& apt autoremove --yes --purge \
&& apt-get purge --yes git build-essential pkg-config libssl-dev libpcre2-dev libargon2-0-dev libsodium-dev libc-ares-dev libcurl4-openssl-dev \
&& apt-get autoremove --yes --purge \
&& cp -r /app/deps/* / \
&& rm -rf /app/deps / \
&& rm -rf /var/lib/apt/lists/*
USER unrealircd
@ -41,4 +41,4 @@ USER unrealircd
CMD /app/unrealircd start \
&& until ! [ -f /app/data/unrealircd.pid ]; do sleep 60; done
EXPOSE 6900 6697 6667
EXPOSE 6667 6697 6900

@ -1,10 +1,10 @@
#/bin/bash
docker run -d -it \
docker run -d \
--restart unless-stopped \
-p 127.0.0.1:6900:6900 \
-p 127.0.0.1:6697:6697 \
-p 127.0.0.1:6667:6667 \
-v /${PWD}/conf/:/app/conf \
-p 6900:6900 \
-p 6697:6697 \
-p 6667:6667 \
-v ${PWD}/conf:/app/conf \
--name unrealircd \
unrealircd:latest