From 6c717e1db04fcbb68b4d5a82d147da1f8966c7bb Mon Sep 17 00:00:00 2001 From: Tommy Date: Thu, 16 Mar 2023 20:43:28 -0400 Subject: [PATCH] Build as unprivileged user Signed-off-by: Tommy --- Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ca7824b..6d14335 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,17 @@ RUN apk -U upgrade \ && apk --no-cache add git \ && adduser -g ${GID} -u ${UID} --disabled-password --gecos "" matrix-to -RUN git clone https://github.com/matrix-org/matrix.to \ - && cd matrix.to \ - && yarn \ - && yarn build - USER matrix-to - + +WORKDIR /home/matrix-to + +RUN git clone https://github.com/matrix-org/matrix.to + +WORKDIR /home/matrix-to/matrix.to + +RUN yarn \ + && yarn build + EXPOSE 5000 ENTRYPOINT ["yarn", "start"]