Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Commit 5db756b

Browse files
committed
Reference the numerical UID for the Docker images to run as.
Signed-off-by: Kashif Saadat <kashifsaadat@gmail.com>
1 parent e3e3197 commit 5db756b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docker/mysql-agent/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM mysql/mysql-server:8.0.12
22

33
COPY bin/linux_amd64/mysql-agent /
44

5-
USER mysql
5+
# Reference the UID for the 'mysql' user
6+
USER 27
67

78
ENTRYPOINT ["/mysql-agent"]

docker/mysql-operator/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@ FROM oraclelinux:7.3
22

33
COPY bin/linux_amd64/mysql-operator /
44

5+
# Add a non-root user and reference the UID
6+
RUN adduser -rU -u 1000 mysql-operator
7+
USER 1000
8+
59
ENTRYPOINT ["/mysql-operator"]

0 commit comments

Comments
 (0)