mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-05 20:57:40 +00:00
GUACAMOLE-890: Security: Allow image to run as non-root user
This commit is contained in:
@@ -56,6 +56,15 @@ WORKDIR /opt/guacamole
|
||||
# Copy artifacts from builder image into this image
|
||||
COPY --from=builder /opt/guacamole/ .
|
||||
|
||||
# Create a new user guacamole
|
||||
ARG UID=1001
|
||||
ARG GID=1001
|
||||
RUN groupadd --gid $GID guacamole
|
||||
RUN useradd --system --create-home --shell /usr/sbin/nologin --uid $UID --gid $GID guacamole
|
||||
|
||||
# Run with user guacamole
|
||||
USER guacamole
|
||||
|
||||
# Start Guacamole under Tomcat, listening on 0.0.0.0:8080
|
||||
EXPOSE 8080
|
||||
CMD ["/opt/guacamole/bin/start.sh" ]
|
||||
|
Reference in New Issue
Block a user