Updated Continerfiles to minimize size
This commit is contained in:
parent
5fc7b39b61
commit
3095ff8d2c
@ -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
|
FROM docker.io/almalinux/9-minimal:latest
|
||||||
LABEL maintainer="b0xxer@b0xxy.net"
|
LABEL maintainer="b0xxer@b0xxy.net"
|
||||||
|
|
||||||
|
|
||||||
ENTRYPOINT ["entrypoint.sh"]
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
ENV HOME /bitcoin
|
ENV HOME /bitcoin
|
||||||
EXPOSE 8332 8333
|
EXPOSE 8332 8333
|
||||||
@ -50,7 +51,8 @@ WORKDIR /bitcoin
|
|||||||
COPY --from=build /opt/ /opt/
|
COPY --from=build /opt/ /opt/
|
||||||
COPY --from=build /usr/local/bin/gosu /usr/local/bin/
|
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 install -y libatomic shadow-utils \
|
||||||
&& microdnf clean all && rm -rf /tmp/* /var/tmp/* \
|
&& microdnf clean all && rm -rf /tmp/* /var/tmp/* \
|
||||||
&& ln -sv /opt/bitcoin/bin/* /usr/local/bin
|
&& 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/
|
COPY ./bin ./entrypoint.sh /usr/local/bin/
|
||||||
RUN chmod +x /usr/local/bin/entrypoint.sh && chmod +x /usr/local/bin/gosu \
|
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"]
|
CMD ["btc_oneshot"]
|
||||||
|
|||||||
@ -2,13 +2,15 @@ FROM docker.io/almalinux/9-minimal:latest
|
|||||||
LABEL maintainer="n0x@n0xb0x.org"
|
LABEL maintainer="n0x@n0xb0x.org"
|
||||||
|
|
||||||
COPY requirements.txt requirements.txt
|
COPY requirements.txt requirements.txt
|
||||||
RUN microdnf update -y \
|
RUN printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf \
|
||||||
|
&& microdnf update -y \
|
||||||
&& microdnf install -y \
|
&& microdnf install -y \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
&& microdnf clean all && rm -fr /tmp/* /var/tmp/* \
|
&& microdnf clean all \
|
||||||
&& pip3 install -r requirements.txt
|
&& pip3 install -r requirements.txt \
|
||||||
|
&& rm -rf /var/cache/* /var/log* /tmp/*
|
||||||
|
|
||||||
EXPOSE 8081 80
|
EXPOSE 8081 80
|
||||||
|
|
||||||
|
|||||||
@ -8,5 +8,6 @@
|
|||||||
file: "{{ item }}"
|
file: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ app_list }}"
|
- "{{ app_list }}"
|
||||||
tags: apps
|
tags:
|
||||||
|
- apps
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,9 @@ FROM docker.io/almalinux/9-base:latest
|
|||||||
|
|
||||||
COPY --from=builder /usr/local/ /usr/local/
|
COPY --from=builder /usr/local/ /usr/local/
|
||||||
|
|
||||||
RUN dnf update -y && dnf install -y ca-certificates \
|
RUN printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf \
|
||||||
|
&& dnf update -y \
|
||||||
|
&& dnf install -y ca-certificates \
|
||||||
gnupg2 \
|
gnupg2 \
|
||||||
libatomic \
|
libatomic \
|
||||||
wget \
|
wget \
|
||||||
@ -39,8 +41,8 @@ RUN dnf update -y && dnf install -y ca-certificates \
|
|||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
micropipenv \
|
micropipenv \
|
||||||
&& dnf clean all && rm -fr /tmp/* /var/tmp/* \
|
&& cd /usr/local/libexec/c-lightning/plugins/clnrest/ && micropipenv install --method requirements \
|
||||||
&& cd /usr/local/libexec/c-lightning/plugins/clnrest/ && micropipenv install --method requirements
|
&& rm -rf /var/cache/* /var/log* /tmp/*
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,5 @@
|
|||||||
#Adapted from iangregsondev - https://github.com/iangregsondev/electrs-docker/blob/main/Dockerfile
|
#Adapted from iangregsondev - https://github.com/iangregsondev/electrs-docker/blob/main/Dockerfile
|
||||||
|
|
||||||
#FROM rust:1.44.1-slim-buster AS builder
|
|
||||||
|
|
||||||
FROM docker.io/almalinux/9-base:latest as builder
|
FROM docker.io/almalinux/9-base:latest as builder
|
||||||
|
|
||||||
ARG VERSION=v{{ electrs_version }}
|
ARG VERSION=v{{ electrs_version }}
|
||||||
@ -17,11 +15,12 @@ RUN git clone --branch $VERSION $REPO .
|
|||||||
RUN cargo build --release --bin electrs
|
RUN cargo build --release --bin electrs
|
||||||
|
|
||||||
|
|
||||||
#FROM debian:buster-slim
|
|
||||||
|
|
||||||
FROM docker.io/almalinux/9-minimal:latest
|
FROM docker.io/almalinux/9-minimal:latest
|
||||||
|
|
||||||
RUN microdnf update -y && microdnf clean all
|
RUN printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf \
|
||||||
|
&& microdnf update -y \
|
||||||
|
&& microdnf clean all \
|
||||||
|
&& rm -rf /var/cache/* /var/log* /tmp/*
|
||||||
|
|
||||||
COPY --from=builder /build/target/release/electrs /bin/electrs
|
COPY --from=builder /build/target/release/electrs /bin/electrs
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,8 @@ ENV LNBITS_VER={{lnbits_version}}
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN dnf update -y \
|
RUN printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf \
|
||||||
|
&& dnf update -y \
|
||||||
&& dnf install -y git \
|
&& dnf install -y git \
|
||||||
python3.11 \
|
python3.11 \
|
||||||
python3.11-devel \
|
python3.11-devel \
|
||||||
@ -26,7 +27,7 @@ RUN dnf update -y \
|
|||||||
COPY .env .env
|
COPY .env .env
|
||||||
RUN dnf autoremove -y python3.11-devel gcc automake make \
|
RUN dnf autoremove -y python3.11-devel gcc automake make \
|
||||||
&& dnf clean all \
|
&& dnf clean all \
|
||||||
&& rm -fr /tmp/*
|
&& rm -rf /var/cache/* /var/log* /tmp/*
|
||||||
|
|
||||||
ENV PATH="/root/.local/bin:$PATH"
|
ENV PATH="/root/.local/bin:$PATH"
|
||||||
ENV LNBITS_PORT="5000"
|
ENV LNBITS_PORT="5000"
|
||||||
|
|||||||
@ -29,11 +29,12 @@ RUN npm prune --production
|
|||||||
# ---------------
|
# ---------------
|
||||||
FROM docker.io/almalinux/9-init
|
FROM docker.io/almalinux/9-init
|
||||||
|
|
||||||
RUN dnf update -y \
|
RUN printf "tsflags=nodocs\n" >>/etc/dnf/dnf.conf \
|
||||||
|
&& dnf update -y \
|
||||||
&& dnf module -y enable nodejs:18 \
|
&& dnf module -y enable nodejs:18 \
|
||||||
&& dnf install -y nodejs \
|
&& dnf install -y nodejs \
|
||||||
&& dnf clean all \
|
&& dnf clean all \
|
||||||
&& rm -fr /tmp/*
|
&& rm -rf /var/cache/* /var/log* /tmp/*
|
||||||
|
|
||||||
WORKDIR /RTL
|
WORKDIR /RTL
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user