Commit f26f93b 1 parent f68b495 commit f26f93b Copy full SHA for f26f93b
File tree 2 files changed +43
-1
lines changed
2 files changed +43
-1
lines changed Original file line number Diff line number Diff line change 9
9
env :
10
10
# TODO: Change variable to your image's name.
11
11
IMAGE_NAME : elements
12
- VERSION : " 23.2.1 "
12
+ VERSION : " 23.2.3 "
13
13
14
14
jobs :
15
15
# Push image to GitHub Packages.
Original file line number Diff line number Diff line change
1
+ FROM debian:buster-slim as builder
2
+
3
+ # VERSION of Elements Core to be download
4
+ ARG VERSION=23.2.3
5
+ ARG TARGETPLATFORM
6
+
7
+ RUN set -ex \
8
+ && if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \
9
+ && if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \
10
+ && apt-get update \
11
+ && apt-get install -qq --no-install-recommends ca-certificates wget \
12
+ && cd /tmp \
13
+ && wget -qO elements.tar.gz "https://github.com/ElementsProject/elements/releases/download/elements-$VERSION/elements-$VERSION-$TARGETPLATFORM.tar.gz" \
14
+ && mkdir bin \
15
+ && tar -xzvf elements.tar.gz -C /tmp/bin --strip-components=2 "elements-$VERSION/bin/elements-cli" "elements-$VERSION/bin/elementsd"
16
+
17
+ FROM debian:stretch-slim
18
+
19
+ # $USER name, and data $DIR to be used in the `final` image
20
+ ARG USER=elements
21
+ ARG DIR=/home/elements
22
+
23
+ COPY --from=builder "/tmp/bin" /usr/local/bin
24
+
25
+ # NOTE: Default GID == UID == 1000
26
+ RUN adduser --disabled-password \
27
+ --home "$DIR/" \
28
+ --gecos "" \
29
+ "$USER"
30
+
31
+ USER $USER
32
+
33
+ # Prevents `VOLUME $DIR/.elements/` being created as owned by `root`
34
+ RUN mkdir -p "$DIR/.elements/"
35
+
36
+ # Expose volume containing all `elementsd` data
37
+ VOLUME $DIR/.elements/
38
+
39
+
40
+ ENTRYPOINT [ "elementsd" ]
41
+
42
+
You can’t perform that action at this time.
0 commit comments