-
Notifications
You must be signed in to change notification settings - Fork 303
Devops_todolist #289
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?
Devops_todolist #289
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| ARG PYTHON_VERSION=3.10 | ||
| FROM python:${PYTHON_VERSION}-slim | ||
|
|
||
| ENV PYTHONUNBUFFERED=1 | ||
|
|
||
| WORKDIR /app | ||
|
|
||
|
Enscream marked this conversation as resolved.
|
||
| COPY requirements.txt . | ||
| RUN pip install --no-cache-dir -r requirements.txt | ||
|
|
||
| COPY . . | ||
|
|
||
| RUN python manage.py migrate | ||
|
|
||
| CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"] | ||
|
Enscream marked this conversation as resolved.
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # ToDo App Docker | ||
|
|
||
|
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 only has ONE stage (one FROM instruction), but the requirements explicitly state it must contain both 'build stage and run stage'. You need a multi-stage build with at least two FROM instructions - one for building and one for running. |
||
| ## Docker Hub | ||
| https://hub.docker.com/r/shvdw/todoapp | ||
|
|
||
| ## Build image | ||
| 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 build instruction is missing the required |
||
|
|
||
| ## Run container | ||
| docker run -p 8080:8080 todoapp | ||
|
|
||
| ## Open in browser | ||
| http://localhost:8080 | ||
Uh oh!
There was an error while loading. Please reload this page.