-
Notifications
You must be signed in to change notification settings - Fork 305
solution #299
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 #299
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,14 @@ | ||
| ARG python_version=3.8 | ||
| FROM python:${python_version} | ||
| WORKDIR /app | ||
| # Спочатку копіюємо requirements.txt | ||
| COPY requirements.txt . | ||
| # Встановлюємо залежності | ||
| RUN pip install -r requirements.txt | ||
| # Копіюємо код проекту | ||
|
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. 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. Missing push instructions: The INSTRUCTION.md should include instructions for pushing the image to Docker Hub with the |
||
| COPY . . | ||
| # Тепер можна мігрувати | ||
| RUN python manage.py migrate | ||
| ENV PYTHONUNBUFFERED=1 | ||
| 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,7 @@ | ||
| # Django ToDo App | ||
| ## Docker Hub | ||
|
Comment on lines
+1
to
+2
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 must contain both a build stage and a run stage (multi-stage build) as required by task item #3. Currently, there's only a single FROM statement. Add a build stage (e.g., |
||
| [Link to your Docker Hub repository](https://hub.docker.com/r/b1mb4/devops_todolist) | ||
| ## Building and Running | ||
| ### Build the image | ||
| ```bash | ||
| docker build -t todoapp . | ||
|
Comment on lines
+1
to
+7
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 file is incomplete. It's missing instructions for running the container and instructions for accessing the application via browser, which are required by task items #12 and #13. Add: 1) |
||
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.
Missing multi-stage build: Requirement #3 explicitly requires a 'build stage and run stage' in the Dockerfile. Currently, there's only a single
FROMinstruction. A multi-stage Dockerfile should have at least twoFROMstatements - one for the build stage (installing dependencies, compiling) and one for the run stage (using a slim base image).