Update dockerfile to not set any runtime user (#3)

Part of https://www.notion.so/Create-stacks-for-mainnet-1f2a6b22d4728034be4be2c51decf94e
- Have removed setting user in dockerfile to avoid file permission issues due to UID mismatch

Co-authored-by: Shreerang Kale <shreerangkale@gmail.com>
Reviewed-on: #3
Co-authored-by: shreerang <shreerang@noreply.git.vdb.to>
Co-committed-by: shreerang <shreerang@noreply.git.vdb.to>
This commit is contained in:
shreerang 2025-06-13 06:23:02 +00:00 committed by nabarun
parent c48fe936bd
commit 38a7f3cb1c
3 changed files with 4 additions and 6 deletions

View File

@ -9,7 +9,7 @@ services:
NODE_PORT: ${NODE_PORT:-26659}
KEY_PREFIX: ${KEY_PREFIX}
volumes:
- tmkms-data:/home/tmkmsuser/tmkms
- tmkms-data:/root/tmkms
- ../config/tmkms/run.sh:/opt/run.sh
extra_hosts:
- "host.docker.internal:host-gateway"

View File

@ -6,7 +6,7 @@ fi
set -e
TMKMS_HOME=/home/tmkmsuser/tmkms
TMKMS_HOME=/root/tmkms
INPUT_PRIV_KEY_FILE=$TMKMS_HOME/tmp/priv_validator_key.json
TMKMS_SECRETS_DIR=$TMKMS_HOME/secrets
TMKMS_STATE_DIR=$TMKMS_HOME/state

View File

@ -47,10 +47,8 @@ RUN apt-get update && \
# Copy compiled binary
COPY --from=builder /home/builder/tmkms/target/release/tmkms /usr/local/bin/tmkms
# Create runtime user
RUN useradd -m tmkmsuser
USER tmkmsuser
WORKDIR /home/tmkmsuser
# Set working directory
WORKDIR /
# Default command, override with `docker run ... bash` etc.
CMD ["tmkms"]