Updated Continerfiles to minimize size

This commit is contained in:
2024-02-19 06:48:17 -06:00
parent 5fc7b39b61
commit 3095ff8d2c
7 changed files with 27 additions and 18 deletions
+5 -2
View File
@@ -41,6 +41,7 @@ RUN wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/downloa
FROM docker.io/almalinux/9-minimal:latest
LABEL maintainer="b0xxer@b0xxy.net"
ENTRYPOINT ["entrypoint.sh"]
ENV HOME /bitcoin
EXPOSE 8332 8333
@@ -50,7 +51,8 @@ WORKDIR /bitcoin
COPY --from=build /opt/ /opt/
COPY --from=build /usr/local/bin/gosu /usr/local/bin/
RUN microdnf update -y \
RUN printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf \
&& microdnf update -y \
&& microdnf install -y libatomic shadow-utils \
&& microdnf clean all && rm -rf /tmp/* /var/tmp/* \
&& ln -sv /opt/bitcoin/bin/* /usr/local/bin
@@ -63,6 +65,7 @@ RUN groupadd -g ${GROUP_ID} bitcoin \
COPY ./bin ./entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh && chmod +x /usr/local/bin/gosu \
&& chmod +x /usr/local/bin/btc_oneshot && chmod +x /usr/local/bin/btc_init
&& chmod +x /usr/local/bin/btc_oneshot && chmod +x /usr/local/bin/btc_init \
&& rm -rf /var/cache/* /var/log* /tmp/*
CMD ["btc_oneshot"]
+5 -3
View File
@@ -2,13 +2,15 @@ FROM docker.io/almalinux/9-minimal:latest
LABEL maintainer="n0x@n0xb0x.org"
COPY requirements.txt requirements.txt
RUN microdnf update -y \
RUN printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf \
&& microdnf update -y \
&& microdnf install -y \
ca-certificates \
python3 \
python3-pip \
&& microdnf clean all && rm -fr /tmp/* /var/tmp/* \
&& pip3 install -r requirements.txt
&& microdnf clean all \
&& pip3 install -r requirements.txt \
&& rm -rf /var/cache/* /var/log* /tmp/*
EXPOSE 8081 80