-
Notifications
You must be signed in to change notification settings - Fork 303
Add Dockerfile and INSTRUCTION.md #282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 . | ||
|
|
||
| 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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Comment on lines
+11
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| COPY --from=base /root/.local /root/.local | ||
|
|
||
| COPY . . | ||
|
|
||
| ENV PATH=/root/.local/bin:$PATH | ||
|
|
||
| RUN python manage.py migrate | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Dockerfile includes |
||
|
|
||
| EXPOSE 8080 | ||
|
|
||
| CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"] | ||
| 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) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
|
|
||
| --- | ||
|
|
||
| ### 2. How to Build the Container | ||
| To build the Docker image locally, navigate to the project root directory and run: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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: |
||
|
|
||
| ```bash | ||
| docker build -t todoapp . | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The provided build command doesn't tag the image with the required There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
There was a problem hiding this comment.
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
Clem97121while the Full Image Path (line 7) usesclem97121. Usernames are effectively case-insensitive on Docker Hub, but please use a consistent casing (prefer lowercase) in the instructions to avoid confusion.