@@ -25,7 +25,6 @@ RUN pip install --no-cache-dir -r requirements.txt --user
2525# images for free. The older but stable python 3.11 is not available.
2626FROM cgr.dev/chainguard/wolfi-base@sha256:e1d402d624011d0f4439bfb0d46a3ddc692465103c7234a326e0194953c3cfe0
2727# Set the working directory in the container
28- WORKDIR /middleware
2928# copy python packages from builder stage
3029COPY --from=builder /home/nonroot/.local /home/nonroot/.local
3130# In in one step, so we do not create layers:
@@ -39,11 +38,12 @@ RUN apk add --no-cache \
3938 git=2.49.0-r1 \
4039 jq=1.8.1-r2 \
4140 openssh-client=10.0_p1-r0 && \
42- mkdir /middleware/output && \
41+ mkdir -p /middleware/output && \
4342 chown nonroot:nonroot /middleware/output
4443# Set the user to nonroot. It's defined in the Wolfi base image with the user id 65532
4544# Copy the application from host
4645COPY middleware/ /middleware/
46+ COPY config.yml /middleware/config.yml
4747# We also copy the container-structure-test environment. This make it a lot easier to test the resulting container.
4848COPY test/container-structure-test /middleware/test/container-structure-test
4949COPY entrypoint.sh /entrypoint.sh
@@ -52,6 +52,6 @@ RUN chmod +x /entrypoint.sh
5252USER nonroot
5353ENTRYPOINT ["/entrypoint.sh" ]
5454# Set the command to run when the container starts
55- CMD [ "python" , "main.py " , "-c" , "config.yml" ]
55+ CMD ["python" , "-m" , "middleware.main " , "-c" , "/middleware/ config.yml" ]
5656
5757
0 commit comments