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 -j4 \
&& make install \ && make install \
&& rm /app/source \ && rm /app/source \
&& cp /app/conf/examples/example.conf /app/conf/unrealircd.conf \
&& rm -rf /opt/unrealircd \ && rm -rf /opt/unrealircd \
&& cd /app \ && cd /app \
&& useradd unrealircd \ && useradd unrealircd \
&& chown unrealircd:unrealircd -R /app \ && 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%;' \ && 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-get 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 autoremove --yes --purge \
&& cp -r /app/deps/* / \ && cp -r /app/deps/* / \
&& rm -rf /app/deps / \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
USER unrealircd USER unrealircd
@ -41,4 +41,4 @@ USER unrealircd
CMD /app/unrealircd start \ CMD /app/unrealircd start \
&& until ! [ -f /app/data/unrealircd.pid ]; do sleep 60; done && until ! [ -f /app/data/unrealircd.pid ]; do sleep 60; done
EXPOSE 6900 6697 6667 EXPOSE 6667 6697 6900

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