Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
ARG PYTHON_VERSION=3.10


FROM python:${PYTHON_VERSION}-slim AS builder

WORKDIR /app

Comment thread
Enscream marked this conversation as resolved.
Comment thread
Enscream marked this conversation as resolved.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt



FROM python:${PYTHON_VERSION}-slim

ENV PYTHONUNBUFFERED=1

WORKDIR /app


COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin

COPY . .

RUN python manage.py migrate

CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
Comment thread
Enscream marked this conversation as resolved.
13 changes: 13 additions & 0 deletions INSTRUCTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ToDo App Docker
https://hub.docker.com/repository/docker/shvdw/todoapp/general
## Build image
docker build -t todoapp:1.0.0 .

## Run container
docker run -p 8080:8080 todoapp:1.0.0

## Docker Hub
docker push shvdw/todoapp:1.0.0

## Open in browser
http://localhost:8080
Loading