Skip to content

Commit

Permalink
Update docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
sylhare committed Mar 6, 2024
1 parent f44526b commit 3eb891c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
FROM python:3.6-alpine
FROM python:3.7-alpine

COPY requirements.txt ./
WORKDIR /app

RUN pip install -r requirements.txt
RUN addgroup -S docker && adduser -S user -G docker
COPY --chown=user:docker src ./src
COPY --chown=user:docker requirements.txt ./
USER user

Add /src /app
RUN pip install -r requirements.txt

WORKDIR /app
RUN ls -la

CMD ["python", "app.py"]
CMD ["python", "-m", "src.app"]
4 changes: 4 additions & 0 deletions src/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from src.example import hello

if __name__ == '__main__':
print(hello())

0 comments on commit 3eb891c

Please sign in to comment.