Skip to content

Commit

Permalink
Use non-root user (#20)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Jun 12, 2023
1 parent cd5f4c3 commit 25f8c23
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 @@ -27,3 +27,5 @@ RUN set -x \
COPY scripts scripts
COPY sql sql
COPY --from=0 /tini /tmp/scripts/tini

USER 999
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 25f8c23

Please sign in to comment.