Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#BUILD STAGE
ARG PYTHON_VERSION=3.11

FROM python:${PYTHON_VERSION}-slim AS builder

WORKDIR /app

COPY requirements.txt .

RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt

#RUN STAGE
FROM python:${PYTHON_VERSION}-slim

ENV PYTHONUNBUFFERED=1

WORKDIR /app

COPY --from=builder /usr/local/lib/python3.11 /usr/local/lib/python3.11
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 Python version 3.11 is hardcoded in this path, which contradicts the purpose of using the PYTHON_VERSION build argument on line 2. If the build argument is changed to a different version, this COPY instruction will fail because the path will be incorrect.

COPY --from=builder /usr/local/bin /usr/local/bin

COPY . .

RUN python manage.py migrate

EXPOSE 8080

CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
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 Instructions

## Docker Hub Repository
https://hub.docker.com/r/justoleh/todoapp

## Build Image

```bash
docker build -t todoapp .
Comment on lines +8 to +13
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 instructions are incomplete. According to the task requirements, you also need to provide the command to run the container and explain how to access the application in a browser.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This file is still missing key instructions. As per the requirements and the previous review, you need to add:

  1. A section with the docker run command to start the container. Don't forget to map the container's port 8080 to a port on the host.
  2. A section explaining how to access the application in a web browser (e.g., by navigating to http://localhost:8080).

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 instructions are incomplete. As per the task requirements, you need to add the command to run the container (using docker run with the correct port mapping) and also provide instructions on how to access the running application in a web browser.

Loading
Loading