From 6ec9ee8193c9af80d6911a932125240cdf70eee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Omar=20Vergara=20P=C3=A9rez?= Date: Fri, 13 Sep 2024 20:39:36 -0600 Subject: [PATCH] fix(docker): add non-root user to the dockerfile --- Dockerfile | 4 ++++ docker-compose.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 617dee1..777fab1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,10 @@ COPY --from=builder /usr/share/fonts /usr/share/fonts ENV FONTCONFIG_PATH /usr/share/fonts +# Use morphos as user +RUN useradd -m morphos +USER morphos + EXPOSE 8080 ENTRYPOINT ["/bin/morphos"] diff --git a/docker-compose.yml b/docker-compose.yml index 822299a..be70ceb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,10 @@ name: morphos services: morphos-server: image: ghcr.io/danvergara/morphos-server:latest + # uncomment this if you want to build the container yourself. + # build: + # context: . + # target: release ports: - 8080:8080 volumes: