From bc9278aa270d43f0a657bfa703622d495476e826 Mon Sep 17 00:00:00 2001 From: SALES Date: Wed, 16 Mar 2022 14:24:06 +1100 Subject: [PATCH 1/3] Using pip cf #29 --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4db9a28..dd70755 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,4 @@ FROM python:3.11.0a3-alpine -LABEL maintainer="michele.barre@opt.nc, jerome.alet@opt.nc" +LABEL maintainer="michele.barre@opt.nc, jerome.alet@opt.nc, adrien.sales@opt.nc" -COPY yamlfixer /usr/local/bin/yamlfixer -COPY requirements.txt /requirements.txt - -RUN chmod 0755 /usr/local/bin/yamlfixer -RUN pip install -r /requirements.txt +RUN pip install yamlfixer-opt-nc From 3cefa7631a12cac9be82eb93e83f5d2cf6291828 Mon Sep 17 00:00:00 2001 From: SALES Date: Wed, 16 Mar 2022 14:39:28 +1100 Subject: [PATCH 2/3] RUN as non root user cf #29 --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index dd70755..27ae812 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,11 @@ FROM python:3.11.0a3-alpine LABEL maintainer="michele.barre@opt.nc, jerome.alet@opt.nc, adrien.sales@opt.nc" + +RUN pip install --upgrade pip + +RUN adduser -D worker +USER worker + RUN pip install yamlfixer-opt-nc +ENV PATH="/home/worker/.local/bin:${PATH}" From cbd60c34c34796515836935d16c4fee800f22bed Mon Sep 17 00:00:00 2001 From: SALES Date: Wed, 16 Mar 2022 15:30:36 +1100 Subject: [PATCH 3/3] Fix docker image with pip cf #29 --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 27ae812..8ddafde 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,6 @@ LABEL maintainer="michele.barre@opt.nc, jerome.alet@opt.nc, adrien.sales@opt.nc" RUN pip install --upgrade pip - -RUN adduser -D worker -USER worker - RUN pip install yamlfixer-opt-nc + ENV PATH="/home/worker/.local/bin:${PATH}"