From 5ee6e8c6eee1cfe103b881c8ffba39343ac697c3 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Thu, 26 Oct 2023 17:41:46 +0100 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20run=20as=20non-root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5623998b..41e45ea1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,28 +28,35 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \ FROM ubuntu:latest ARG LIGHTNING_PORTS="4200-4299 4300-4399" -WORKDIR /root +ARG USERNAME="lgtn" +WORKDIR /home/$USERNAME SHELL ["/bin/bash", "-c"] RUN apt-get update && \ apt-get install -y \ libssl-dev \ - ca-certificates + ca-certificates \ + curl COPY --from=build /build/lightning-node /usr/local/bin/lgtn -COPY <