Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: "23.3.0"
VERSION: "23.3.3"

jobs:
# Push image to GitHub Packages.
Expand Down
47 changes: 47 additions & 0 deletions 23.3.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
FROM debian:trixie-slim AS builder

# VERSION of Elements Core to be download
ARG VERSION=23.3.3
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:trixie-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 useradd -M \
-d "$DIR/" \
-s /usr/sbin/nologin \
-u 1000 \
-U \
-c "" \
"$USER" && \
mkdir -p "$DIR" && \
chown -R "$USER:$USER" "$DIR/"

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" ]


Loading