-
Notifications
You must be signed in to change notification settings - Fork 303
Solution #277
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?
Solution #277
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,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 --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"] | ||
| 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
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 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. 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. This file is still missing key instructions. As per the requirements and the previous review, you need to add:
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 instructions are incomplete. As per the task requirements, you need to add the command to run the container (using |
||
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.
The Python version
3.11is hardcoded in this path, which contradicts the purpose of using thePYTHON_VERSIONbuild argument on line 2. If the build argument is changed to a different version, thisCOPYinstruction will fail because the path will be incorrect.