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
9 changes: 9 additions & 0 deletions INSTRUCTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ToDo App Docker
## Docker Hub
https://hub.docker.com/r/oleksijlyashenko1/todoapp
## Build
docker build -t todoapp .
## Run
docker run -p 8080:8080 todoapp
## Access
http://localhost:8080
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION}-slim AS builder
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build command uses todo-app but the task requires naming the image todoapp. Update to docker build -t todoapp .


FROM python:${PYTHON_VERSION}-slim
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The run command references todo-app but should use todoapp to match the image name specified in the task requirements.

WORKDIR /app
COPY --from=builder /install /usr/local
COPY . /app

RUN python manage.py migrate
ENV PYTHONUNBUFFERED=1
CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
Loading