File tree Expand file tree Collapse file tree 15 files changed +76
-30
lines changed Expand file tree Collapse file tree 15 files changed +76
-30
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,15 @@ FROM alpine
9494ARG UID=100
9595ARG GID=101
9696
97+ # 设置环境变量
98+ ENV USER=bitcoin
99+
97100LABEL maintainer=
"GeekWho <[email protected] >" 98101LABEL version="1.0"
99102LABEL description="A bitcoin-core docker image"
100103
101- RUN addgroup bitcoin --gid ${GID} --system
102- RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin
104+ RUN addgroup ${USER} --gid ${GID} --system
105+ RUN adduser --uid ${UID} --system ${USER} --ingroup ${USER}
103106RUN sed -i 's/http\:\/\/ dl-cdn.alpinelinux.org/https\:\/\/ alpine.global.ssl.fastly.net/g' /etc/apk/repositories
104107RUN apk --no-cache add \
105108 libevent \
Original file line number Diff line number Diff line change @@ -37,12 +37,15 @@ FROM debian:bookworm-slim
3737ARG UID=101
3838ARG GID=101
3939
40+ # 设置环境变量
41+ ENV USER=bitcoin
42+
4043ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
4144ENV BITCOIN_VERSION=25.0
4245ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
4346
44- RUN groupadd --gid ${GID} bitcoin \
45- && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
47+ RUN groupadd --system -- gid ${GID} ${USER} \
48+ && useradd --system -- create-home --no-log-init -u ${UID} -g ${GID} ${USER} \
4649 && apt-get update -y \
4750 && apt-get install -y gosu --no-install-recommends \
4851 && apt-get clean \
Original file line number Diff line number Diff line change @@ -37,12 +37,15 @@ FROM ubuntu:23.04
3737ARG UID=101
3838ARG GID=101
3939
40+ # 设置环境变量
41+ ENV USER=bitcoin
42+
4043ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
4144ENV BITCOIN_VERSION=25.0
4245ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
4346
44- RUN groupadd --gid ${GID} bitcoin \
45- && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
47+ RUN groupadd --system -- gid ${GID} ${USER} \
48+ && useradd --system -- create-home --no-log-init -u ${UID} -g ${GID} ${USER} \
4649 && apt-get update -y \
4750 && apt-get install -y gosu --no-install-recommends \
4851 && apt-get clean \
Original file line number Diff line number Diff line change @@ -94,12 +94,15 @@ FROM alpine
9494ARG UID=100
9595ARG GID=101
9696
97+ # 设置环境变量
98+ ENV USER=bitcoin
99+
97100LABEL maintainer=
"GeekWho <[email protected] >" 98101LABEL version="1.0"
99102LABEL description="A bitcoin-core docker image"
100103
101- RUN addgroup bitcoin --gid ${GID} --system
102- RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin
104+ RUN addgroup ${USER} --gid ${GID} --system
105+ RUN adduser --uid ${UID} --system ${USER} --ingroup ${USER}
103106RUN sed -i 's/http\:\/\/ dl-cdn.alpinelinux.org/https\:\/\/ alpine.global.ssl.fastly.net/g' /etc/apk/repositories
104107RUN apk --no-cache add \
105108 libevent \
Original file line number Diff line number Diff line change @@ -37,12 +37,15 @@ FROM debian:bookworm-slim
3737ARG UID=101
3838ARG GID=101
3939
40+ # 设置环境变量
41+ ENV USER=bitcoin
42+
4043ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
4144ENV BITCOIN_VERSION=26.0
4245ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
4346
44- RUN groupadd --gid ${GID} bitcoin \
45- && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
47+ RUN groupadd --system -- gid ${GID} ${USER} \
48+ && useradd --system -- create-home --no-log-init -u ${UID} -g ${GID} ${USER} \
4649 && apt-get update -y \
4750 && apt-get install -y gosu --no-install-recommends \
4851 && apt-get clean \
Original file line number Diff line number Diff line change @@ -37,12 +37,15 @@ FROM ubuntu:23.04
3737ARG UID=101
3838ARG GID=101
3939
40+ # 设置环境变量
41+ ENV USER=bitcoin
42+
4043ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
4144ENV BITCOIN_VERSION=26.0
4245ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
4346
44- RUN groupadd --gid ${GID} bitcoin \
45- && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
47+ RUN groupadd --system -- gid ${GID} ${USER} \
48+ && useradd --system -- create-home --no-log-init -u ${UID} -g ${GID} ${USER} \
4649 && apt-get update -y \
4750 && apt-get install -y gosu --no-install-recommends \
4851 && apt-get clean \
Original file line number Diff line number Diff line change @@ -92,12 +92,15 @@ FROM alpine
9292ARG UID=100
9393ARG GID=101
9494
95+ # 设置环境变量
96+ ENV USER=bitcoin
97+
9598LABEL maintainer=
"GeekWho <[email protected] >" 9699LABEL version="1.0"
97100LABEL description="A bitcoin-core docker image"
98101
99- RUN addgroup bitcoin --gid ${GID} --system
100- RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin
102+ RUN addgroup ${USER} --gid ${GID} --system
103+ RUN adduser --uid ${UID} --system ${USER} --ingroup ${USER}
101104RUN sed -i 's/http\:\/\/ dl-cdn.alpinelinux.org/https\:\/\/ alpine.global.ssl.fastly.net/g' /etc/apk/repositories
102105RUN apk --no-cache add \
103106 libevent \
Original file line number Diff line number Diff line change @@ -37,12 +37,15 @@ FROM debian:bookworm-slim
3737ARG UID=101
3838ARG GID=101
3939
40+ # 设置环境变量
41+ ENV USER=bitcoin
42+
4043ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
4144ENV BITCOIN_VERSION=27.0
4245ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
4346
44- RUN groupadd --gid ${GID} bitcoin \
45- && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
47+ RUN groupadd --system -- gid ${GID} ${USER} \
48+ && useradd --system -- create-home --no-log-init -u ${UID} -g ${GID} ${USER} \
4649 && apt-get update -y \
4750 && apt-get install -y gosu --no-install-recommends \
4851 && apt-get clean \
Original file line number Diff line number Diff line change @@ -37,12 +37,15 @@ FROM ubuntu:23.04
3737ARG UID=101
3838ARG GID=101
3939
40+ # 设置环境变量
41+ ENV USER=bitcoin
42+
4043ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
4144ENV BITCOIN_VERSION=27.0
4245ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
4346
44- RUN groupadd --gid ${GID} bitcoin \
45- && useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
47+ RUN groupadd --system -- gid ${GID} ${USER} \
48+ && useradd --system -- create-home --no-log-init -u ${UID} -g ${GID} ${USER} \
4649 && apt-get update -y \
4750 && apt-get install -y gosu --no-install-recommends \
4851 && apt-get clean \
Original file line number Diff line number Diff line change @@ -92,12 +92,15 @@ FROM alpine
9292ARG UID=100
9393ARG GID=101
9494
95+ # 设置环境变量
96+ ENV USER=bitcoin
97+
9598LABEL maintainer=
"GeekWho <[email protected] >" 9699LABEL version="1.0"
97100LABEL description="A bitcoin-core docker image"
98101
99- RUN addgroup bitcoin --gid ${GID} --system
100- RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin
102+ RUN addgroup ${USER} --gid ${GID} --system
103+ RUN adduser --uid ${UID} --system bitcoin --ingroup ${USER}
101104RUN sed -i 's/http\:\/\/ dl-cdn.alpinelinux.org/https\:\/\/ alpine.global.ssl.fastly.net/g' /etc/apk/repositories
102105RUN apk --no-cache add \
103106 libevent \
You can’t perform that action at this time.
0 commit comments