From a9e2c878e2f7df9f6f765bc41ba839d93f8c43ef Mon Sep 17 00:00:00 2001 From: altafan <18440657+altafan@users.noreply.github.com> Date: Thu, 7 Dec 2023 17:23:28 +0100 Subject: [PATCH] Elements 23.2.1 --- .github/workflows/docker-publish.yml | 2 +- 23.2.1/Dockerfile | 42 ++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 23.2.1/Dockerfile diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3d3ac45..c295e21 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -9,7 +9,7 @@ on: env: # TODO: Change variable to your image's name. IMAGE_NAME: elements - VERSION: "22.1.1" + VERSION: "23.2.1" jobs: # Push image to GitHub Packages. diff --git a/23.2.1/Dockerfile b/23.2.1/Dockerfile new file mode 100644 index 0000000..5cf95eb --- /dev/null +++ b/23.2.1/Dockerfile @@ -0,0 +1,42 @@ +FROM debian:stretch-slim as builder + +# VERSION of Elements Core to be download +ARG VERSION=23.2.1 +ARG TARGETPLATFORM + +RUN set -ex \ + && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \ + && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \ + && apt-get update \ + && apt-get install -qq --no-install-recommends ca-certificates wget \ + && cd /tmp \ + && wget -qO elements.tar.gz "https://github.com/ElementsProject/elements/releases/download/elements-$VERSION/elements-$VERSION-$TARGETPLATFORM.tar.gz" \ + && mkdir bin \ + && tar -xzvf elements.tar.gz -C /tmp/bin --strip-components=2 "elements-$VERSION/bin/elements-cli" "elements-$VERSION/bin/elementsd" + +FROM debian:stretch-slim + +# $USER name, and data $DIR to be used in the `final` image +ARG USER=elements +ARG DIR=/home/elements + +COPY --from=builder "/tmp/bin" /usr/local/bin + +# NOTE: Default GID == UID == 1000 +RUN adduser --disabled-password \ + --home "$DIR/" \ + --gecos "" \ + "$USER" + +USER $USER + +# Prevents `VOLUME $DIR/.elements/` being created as owned by `root` +RUN mkdir -p "$DIR/.elements/" + +# Expose volume containing all `elementsd` data +VOLUME $DIR/.elements/ + + +ENTRYPOINT [ "elementsd" ] + +