Commit 6ac7233b authored by TonyFord's avatar TonyFord
Browse files

remove user ids

parent 34fc40b4
......@@ -15,6 +15,8 @@ build-faircoind:
variables:
- $CMD =~ /build/
before_script:
- export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g`
- mkdir -p ~/.faircoin2
- source ${FAIRCOIN_CONF}
- echo -e "rpcconnect=${rpcconnect}\nrpcport=${rpcport}\nrpcuser=${rpcuser}\nrpcpassword=${rpcpassword}\ntxindex=1" > ~/.faircoin2/faircoin.conf
......@@ -34,6 +36,8 @@ start-faircoind:
variables:
- $CMD =~ /build|start/
before_script:
- export RUNNER_UID=`id -u`
- export RUNNER_GID=`id -g`
- chmod +x ./script/blocknotify.sh
script:
- docker-compose stop
......
......@@ -35,10 +35,10 @@ RUN rm -rf /var/lib/apt/lists/* && \
#####################################################################################root##
### create and run user account to image ##################################################
ARG GITLAB_RUNNER_GID
ARG GITLAB_RUNNER_UID
RUN groupadd -g $GITLAB_RUNNER_GID faircoin
RUN useradd --create-home --shell /bin/bash faircoin --uid $GITLAB_RUNNER_UID --gid $GITLAB_RUNNER_GID
ARG RUNNER_GID
ARG RUNNER_UID
RUN groupadd -g $RUNNER_GID faircoin
RUN useradd --create-home --shell /bin/bash faircoin --uid $RUNNER_UID --gid $RUNNER_GID
USER faircoin
#################################################################################faircoin##
......
......@@ -7,8 +7,8 @@ services:
context: ./
args:
source_repository: "https://github.com/faircoin/faircoin.git"
GITLAB_RUNNER_UID: "${GITLAB_RUNNER_UID}"
GITLAB_RUNNER_GID: "${GITLAB_RUNNER_GID}"
RUNNER_UID: "${RUNNER_UID}"
RUNNER_GID: "${RUNNER_GID}"
FAIRCOIN_PORT: ${FAIRCOIN_PORT}
env_file:
- ../faircoind.tmp/FAIRCOIN_CONF
......@@ -16,7 +16,7 @@ services:
restart: always
command: '-disablewallet -port=${FAIRCOIN_PORT} -blocknotify=/home/faircoin/script/blocknotify.sh'
network_mode: "host"
user: "${GITLAB_RUNNER_UID}:${GITLAB_RUNNER_GID}"
user: "${RUNNER_UID}:${RUNNER_GID}"
volumes:
- ~/.faircoin2:/home/faircoin/.faircoin2
- ./script:/home/faircoin/script
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment