Skip to content

Commit

Permalink
Use non-root user
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Jun 12, 2023
1 parent 6261757 commit 341671c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ RUN set -x \
COPY scripts scripts
COPY sql sql
COPY --from=0 /tini /tmp/scripts/tini

USER 998:996
4 changes: 1 addition & 3 deletions scripts/proxysql-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ function log() {
echo "$(timestamp) [$script_name] [$log_type] $msg"
}

cp /etc/custom-config/proxysql.cnf /etc/proxysql.cnf

# If command has arguments, prepend proxysql
if [ "${1:0:1}" = '-' ]; then
CMDARG="$@"
fi

# Start ProxySQL with PID 1
exec proxysql -f $CMDARG &
exec proxysql -c /etc/custom-config/proxysql.cnf -f $CMDARG &
pid=$!

log "INFO" "Configuring proxysql ..."
Expand Down

0 comments on commit 341671c

Please sign in to comment.