Skip to content

Commit 17429f9

Browse files
committed
feat: update taproot-assets & litd & lnd image latest version
update litd image to v0.12.2 update taproot-assets image to v0.3.2 update lnd image to v0.17.3
1 parent 3c03cc7 commit 17429f9

File tree

7 files changed

+171
-0
lines changed

7 files changed

+171
-0
lines changed

.github/workflows/lighting_network.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,18 @@ jobs:
2323
context: "./lnd/alpine/v0.17.0-beta"
2424
- name: lnd-v0.17.1-beta-alpine
2525
context: "./lnd/alpine/v0.17.1-beta"
26+
- name: lnd-v0.17.3-beta-alpine
27+
context: "./lnd/alpine/v0.17.3-beta"
2628
- name: taproot-assets-v0.3.0-alpha-alpine
2729
context: "./tapd/alpine/v0.3.0-alpha"
2830
- name: taproot-assets-v0.3.1-alpha-alpine
2931
context: "./tapd/alpine/v0.3.1-alpha"
32+
- name: taproot-assets-v0.3.2-alpha-alpine
33+
context: "./tapd/alpine/v0.3.2-alpha"
3034
- name: litd-v0.12.0-alpha-alpine
3135
context: "./litd/alpine/v0.12.0-alpha"
36+
- name: litd-v0.12.2-alpha-alpine
37+
context: "./litd/alpine/v0.12.2-alpha"
3238
steps:
3339
- name: Checkout
3440
uses: actions/checkout@v4
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Build stage for compiled artifacts
2+
FROM lightninglabs/lightning-terminal:v0.12.2-alpha
3+
4+
# Map host user uid and gid
5+
ARG HOST_UID=100
6+
ARG HOST_GID=101
7+
8+
ENV USER_HOME=/home/litd/
9+
ENV USER_NAME=litd
10+
ENV USER_GROUP=litd
11+
12+
LABEL maintainer="GeekWho <[email protected]>"
13+
LABEL version="1.0"
14+
LABEL description="A lightning litd docker image base on lightninglabs/lightning-terminal"
15+
16+
RUN addgroup ${USER_GROUP} --gid ${HOST_GID} --system
17+
RUN adduser --uid ${HOST_UID} --system ${USER_NAME} --ingroup ${USER_GROUP}
18+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
19+
RUN apk --no-cache add \
20+
shadow \
21+
su-exec
22+
23+
COPY docker-entrypoint.sh /entrypoint.sh
24+
25+
VOLUME ["$USER_HOME"]
26+
27+
ENTRYPOINT ["/entrypoint.sh"]
28+
29+
CMD ["litd"]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Check if HOST_UID is set and not 0
5+
if [ -n "${HOST_UID+x}" ] && [ "${HOST_UID}" != "0" ]; then
6+
usermod -u "$HOST_UID" $USER_NAME # Change the user ID to HOST_UID
7+
fi
8+
9+
# Check if HOST_GID is set and not 0
10+
if [ -n "${HOST_GID+x}" ] && [ "${HOST_GID}" != "0" ]; then
11+
if grep -q ":$HOST_GID:" /etc/group; then # if group exists
12+
usermod -a -G $HOST_GID $USER_NAME # Add USER_NAME to Group ID HOST_GID
13+
else
14+
groupmod -g "$HOST_GID" $USER_NAME # Change the group ID to HOST_GID
15+
fi
16+
fi
17+
18+
echo "$0: assuming uid:gid for ${USER_NAME}:${USER_NAME} of $(id -u $USER_NAME):$(id -g $USER_NAME)"
19+
20+
# Get the home directory of $USER_NAME
21+
home_dir=$(getent passwd $USER_NAME | cut -d: -f6)
22+
# Change ownership of the home directory
23+
chown -R $USER_NAME:$HOST_GID ${home_dir}
24+
echo "reset home dir permissions for user ${USER_NAME}:${HOST_GID} done."
25+
echo "start ${USER_NAME} with user ${USER_NAME}..."
26+
exec su-exec $USER_NAME:$HOST_GID "$@" # Execute the command with the specified user

lnd/alpine/v0.17.3-beta/Dockerfile

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Build stage for compiled artifacts
2+
FROM lightninglabs/lnd:v0.17.3-beta
3+
4+
# Map host user uid and gid
5+
ARG HOST_UID=100
6+
ARG HOST_GID=101
7+
8+
ENV USER_HOME=/home/lnd/
9+
ENV USER_NAME=lnd
10+
ENV USER_GROUP=lnd
11+
12+
LABEL maintainer="GeekWho <[email protected]>"
13+
LABEL version="1.0"
14+
LABEL description="A lightning lnd docker image base on lightninglabs/lnd"
15+
16+
RUN addgroup ${USER_GROUP} --gid ${HOST_GID} --system
17+
RUN adduser --uid ${HOST_UID} --system ${USER_NAME} --ingroup ${USER_GROUP}
18+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
19+
RUN apk --no-cache add \
20+
shadow \
21+
su-exec
22+
23+
COPY docker-entrypoint.sh /entrypoint.sh
24+
25+
VOLUME ["$USER_HOME"]
26+
27+
ENTRYPOINT ["/entrypoint.sh"]
28+
29+
CMD ["lnd"]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Check if HOST_UID is set and not 0
5+
if [ -n "${HOST_UID+x}" ] && [ "${HOST_UID}" != "0" ]; then
6+
usermod -u "$HOST_UID" $USER_NAME # Change the user ID to HOST_UID
7+
fi
8+
9+
# Check if HOST_GID is set and not 0
10+
if [ -n "${HOST_GID+x}" ] && [ "${HOST_GID}" != "0" ]; then
11+
if grep -q ":$HOST_GID:" /etc/group; then # if group exists
12+
usermod -a -G $HOST_GID $USER_NAME # Add USER_NAME to Group ID HOST_GID
13+
else
14+
groupmod -g "$HOST_GID" $USER_NAME # Change the group ID to HOST_GID
15+
fi
16+
fi
17+
18+
echo "$0: assuming uid:gid for ${USER_NAME}:${USER_NAME} of $(id -u $USER_NAME):$(id -g $USER_NAME)"
19+
20+
# Get the home directory of $USER_NAME
21+
home_dir=$(getent passwd $USER_NAME | cut -d: -f6)
22+
# Change ownership of the home directory
23+
chown -R $USER_NAME:$HOST_GID ${home_dir}
24+
echo "reset home dir permissions for user ${USER_NAME}:${HOST_GID} done."
25+
echo "start ${USER_NAME} with user ${USER_NAME}..."
26+
exec su-exec $USER_NAME:$HOST_GID "$@" # Execute the command with the specified user
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Build stage for compiled artifacts
2+
FROM lightninglabs/taproot-assets:v0.3.2
3+
4+
# Map host user uid and gid
5+
ARG HOST_UID=100
6+
ARG HOST_GID=101
7+
8+
ENV USER_HOME=/home/tapd/
9+
ENV USER_NAME=tapd
10+
ENV USER_GROUP=tapd
11+
12+
LABEL maintainer="GeekWho <[email protected]>"
13+
LABEL version="1.0"
14+
LABEL description="A lightning tapd docker image base on lightninglabs/taproot-assets"
15+
16+
RUN addgroup ${USER_GROUP} --gid ${HOST_GID} --system
17+
RUN adduser --uid ${HOST_UID} --system ${USER_NAME} --ingroup ${USER_GROUP}
18+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
19+
RUN apk --no-cache add \
20+
shadow \
21+
su-exec
22+
23+
COPY docker-entrypoint.sh /entrypoint.sh
24+
25+
VOLUME ["$USER_HOME"]
26+
27+
ENTRYPOINT ["/entrypoint.sh"]
28+
29+
CMD ["tapd"]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# Check if HOST_UID is set and not 0
5+
if [ -n "${HOST_UID+x}" ] && [ "${HOST_UID}" != "0" ]; then
6+
usermod -u "$HOST_UID" $USER_NAME # Change the user ID to HOST_UID
7+
fi
8+
9+
# Check if HOST_GID is set and not 0
10+
if [ -n "${HOST_GID+x}" ] && [ "${HOST_GID}" != "0" ]; then
11+
if grep -q ":$HOST_GID:" /etc/group; then # if group exists
12+
usermod -a -G $HOST_GID $USER_NAME # Add USER_NAME to Group ID HOST_GID
13+
else
14+
groupmod -g "$HOST_GID" $USER_NAME # Change the group ID to HOST_GID
15+
fi
16+
fi
17+
18+
echo "$0: assuming uid:gid for ${USER_NAME}:${USER_NAME} of $(id -u $USER_NAME):$(id -g $USER_NAME)"
19+
20+
# Get the home directory of $USER_NAME
21+
home_dir=$(getent passwd $USER_NAME | cut -d: -f6)
22+
# Change ownership of the home directory
23+
chown -R $USER_NAME:$HOST_GID ${home_dir}
24+
echo "reset home dir permissions for user ${USER_NAME}:${HOST_GID} done."
25+
echo "start ${USER_NAME} with user ${USER_NAME}..."
26+
exec su-exec $USER_NAME:$HOST_GID "$@" # Execute the command with the specified user

0 commit comments

Comments
 (0)