mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-02-23 04:54:23 +01:00
Using alpine-glibc-base base image
This commit is contained in:
23
proxy_docker/Dockerfile
Normal file
23
proxy_docker/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM cyphernode/alpine-glibc-base:3.8
|
||||
|
||||
ENV HOME /proxy
|
||||
|
||||
RUN apk add --update --no-cache \
|
||||
sqlite \
|
||||
jq \
|
||||
curl \
|
||||
su-exec
|
||||
|
||||
WORKDIR ${HOME}
|
||||
|
||||
COPY app/data/* ./
|
||||
COPY app/script/* ./
|
||||
COPY --from=cyphernode/clightning:v0.7.0-test /usr/local/bin/lightning-cli ./
|
||||
|
||||
RUN chmod +x startproxy.sh requesthandler.sh lightning-cli sqlmigrate*.sh waitanyinvoice.sh \
|
||||
&& chmod o+w . \
|
||||
&& mkdir db
|
||||
|
||||
VOLUME ["${HOME}/db", "/.lightning"]
|
||||
|
||||
ENTRYPOINT ["su-exec"]
|
||||
@@ -1,39 +0,0 @@
|
||||
FROM alpine:3.8
|
||||
|
||||
# Taking care of glibc shit (glibc not natively supported by Alpine but lightning-cli uses it)
|
||||
|
||||
ENV GLIBC_VERSION 2.27-r0
|
||||
ENV GLIBC_SHA256 938bceae3b83c53e7fa9cc4135ce45e04aae99256c5e74cf186c794b97473bc7
|
||||
ENV GLIBCBIN_SHA256 3a87874e57b9d92e223f3e90356aaea994af67fb76b71bb72abfb809e948d0d6
|
||||
# Download and install glibc (https://github.com/jeanblanchard/docker-alpine-glibc/blob/master/Dockerfile)
|
||||
RUN wget -O /etc/apk/keys/sgerrand.rsa.pub https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$GLIBC_VERSION/sgerrand.rsa.pub \
|
||||
&& wget -O glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" \
|
||||
&& echo "$GLIBC_SHA256 glibc.apk" | sha256sum -c - \
|
||||
&& wget -O glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" \
|
||||
&& echo "$GLIBCBIN_SHA256 glibc-bin.apk" | sha256sum -c - \
|
||||
&& apk add --update --no-cache glibc-bin.apk glibc.apk \
|
||||
&& /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib \
|
||||
&& echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf \
|
||||
&& rm -rf glibc.apk glibc-bin.apk
|
||||
|
||||
ENV HOME /proxy
|
||||
|
||||
RUN apk add --update --no-cache \
|
||||
sqlite \
|
||||
jq \
|
||||
curl \
|
||||
su-exec
|
||||
|
||||
WORKDIR ${HOME}
|
||||
|
||||
COPY app/data/* ./
|
||||
COPY app/script/* ./
|
||||
COPY --from=cyphernode/clightning:v0.7.0 /usr/local/bin/lightning-cli ./
|
||||
|
||||
RUN chmod +x startproxy.sh requesthandler.sh lightning-cli sqlmigrate*.sh waitanyinvoice.sh \
|
||||
&& chmod o+w . \
|
||||
&& mkdir db
|
||||
|
||||
VOLUME ["${HOME}/db", "/.lightning"]
|
||||
|
||||
ENTRYPOINT ["su-exec"]
|
||||
@@ -1,35 +0,0 @@
|
||||
FROM alpine:3.8
|
||||
|
||||
# Taking care of glibc shit (glibc not natively supported by Alpine but lightning-cli uses it)
|
||||
|
||||
ENV GLIBC_VERSION 2.27-r0
|
||||
# Download and install glibc (https://github.com/jeanblanchard/docker-alpine-glibc/blob/master/Dockerfile)
|
||||
RUN apk add --update --no-cache wget \
|
||||
&& wget -O glibc.apk "https://github.com/yangxuan8282/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" \
|
||||
&& wget -O glibc-bin.apk "https://github.com/yangxuan8282/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" \
|
||||
&& apk add --allow-untrusted --update --no-cache glibc-bin.apk glibc.apk \
|
||||
&& /usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib \
|
||||
&& echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf \
|
||||
&& rm -rf glibc.apk glibc-bin.apk
|
||||
|
||||
ENV HOME /proxy
|
||||
|
||||
RUN apk add --update --no-cache \
|
||||
sqlite \
|
||||
jq \
|
||||
curl \
|
||||
su-exec
|
||||
|
||||
WORKDIR ${HOME}
|
||||
|
||||
COPY app/data/* ./
|
||||
COPY app/script/* ./
|
||||
COPY --from=cyphernode/clightning:v0.7.0 /usr/local/bin/lightning-cli ./
|
||||
|
||||
RUN chmod +x startproxy.sh requesthandler.sh lightning-cli sqlmigrate*.sh waitanyinvoice.sh \
|
||||
&& chmod o+w . \
|
||||
&& mkdir db
|
||||
|
||||
VOLUME ["${HOME}/db", "/.lightning"]
|
||||
|
||||
ENTRYPOINT ["su-exec"]
|
||||
@@ -48,22 +48,6 @@ OTS_FILES=/proxy/otsfiles
|
||||
XPUB_DERIVATION_GAP=100
|
||||
```
|
||||
|
||||
## Choose the right architecture
|
||||
|
||||
...by modifying the following line in Dockerfile:
|
||||
|
||||
```shell
|
||||
COPY app/bin/lightning-cli_x86 ${HOME}/lightning-cli
|
||||
```
|
||||
|
||||
...to lightning-cli_arm if running on a RPi.
|
||||
|
||||
## Building docker image
|
||||
|
||||
```shell
|
||||
docker build -t btcproxyimg .
|
||||
```
|
||||
|
||||
## Create sqlite3 database path and give rights
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user