Skip to content

Commit

Permalink
Elements 23.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
altafan committed Dec 7, 2023
1 parent 6cfb710 commit f68b495
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
42 changes: 42 additions & 0 deletions 23.2.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM debian:buster-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" ]


0 comments on commit f68b495

Please sign in to comment.