Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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/todo-app
## Build
docker build -t todo-app .
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 task requirement specifies naming the image todoapp, but the instruction shows docker build -t todo-app .. These should match the requirement.

## Run
docker run -p 8080:8080 todo-app
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 task requirement specifies the tag should be todoapp:1.0.0, but the instruction shows todo-app without a version tag. The Docker Hub link also shows todo-app repository name. Please ensure consistency with the task requirement.

## 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