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
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION} AS base

WORKDIR /app

COPY requirements.txt .

Comment on lines +6 to +7
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor: The Docker Hub URL (line 6) uses Clem97121 while the Full Image Path (line 7) uses clem97121. Usernames are effectively case-insensitive on Docker Hub, but please use a consistent casing (prefer lowercase) in the instructions to avoid confusion.

RUN pip install --user --no-cache-dir -r requirements.txt

FROM python:${PYTHON_VERSION}-slim AS runner

ENV PYTHONUNBUFFERED=1

WORKDIR /app

Comment on lines +14 to +15
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 INSTRUCTION.md provides a local build command but does not tag the image as 1.0.0 nor shows how to push to your Docker Hub repository. The task requires the image be pushed to your Docker Hub repo as todoapp:1.0.0. Update the instructions to build with the correct tag (for example docker build -t <your-dockerhub-username>/todoapp:1.0.0 .) and add steps to docker push the resulting image to your Docker Hub repository.

Comment on lines +11 to +15
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

INSTRUCTION.md is missing instructions to run the container and how to access the application via a browser. Add a docker run example that maps the container port 8080 to a host port (for example docker run -p 8080:8080 <your-dockerhub-username>/todoapp:1.0.0) and a note that the app will be reachable at http://localhost:8080 after the container starts.

COPY --from=base /root/.local /root/.local

COPY . .

ENV PATH=/root/.local/bin:$PATH

RUN python manage.py migrate
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 Dockerfile includes RUN python manage.py migrate (as required). Note: running migrations at image build time will succeed only if the project uses a local DB (e.g. default SQLite). If the app expects an external DB, this RUN will fail during build — ensure your Django settings allow migrations at build time or consider running migrations at container start. The task explicitly required a RUN migration, so keep this in mind.


EXPOSE 8080

CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
15 changes: 15 additions & 0 deletions INSTRUCTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ToDo Application - Docker Instructions

This project is a Django-based ToDo application containerized with Docker.

### 1. Docker Hub Repository
You can find the official image for this application here:
[https://hub.docker.com/r/Clem97121/todoapp](https://hub.docker.com/r/Clem97121/todoapp)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You included a Docker Hub repository link, but the checklist requires a link to your personal Docker Hub repository with the app image. Make sure to explicitly reference the image (including tag) or the full image path, e.g. https://hub.docker.com/r/<username>/todoapp or mention <username>/todoapp:1.0.0 so validators can find the pushed image.


---

### 2. How to Build the Container
To build the Docker image locally, navigate to the project root directory and run:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You're missing instructions to run the container and access the app in a browser. Add an example run command (for example: docker run -d -p 8080:8080 --name todoapp <username>/todoapp:1.0.0) and state that the application will be available at http://localhost:8080/.


```bash
docker build -t todoapp .
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 provided build command doesn't tag the image with the required 1.0.0 tag or the personal repo name. The checklist requires building the image named todoapp and pushing it to your Docker Hub repo as todoapp:1.0.0. Update the instructions to show a build like docker build -t <username>/todoapp:1.0.0 . (or at least docker build -t todoapp:1.0.0 .) before pushing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

INSTRUCTION.md is missing push steps to Docker Hub. Add explicit instructions such as docker login, then docker push <username>/todoapp:1.0.0 so the image is actually published to your Docker Hub repository as required by the task.

Loading