-
Notifications
You must be signed in to change notification settings - Fork 328
Done! #313
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?
Done! #313
Changes from all 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,25 @@ | ||
|
|
||
| ARG PYTHON_VERSION=3.8 | ||
| FROM python:${PYTHON_VERSION} AS builder | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY requirements.txt . | ||
| RUN pip install -r requirements.txt | ||
|
|
||
|
|
||
| ARG PYTHON_VERSION=3.8 | ||
| FROM python:${PYTHON_VERSION} | ||
|
|
||
| ENV PYTHONUNBUFFERED=1 | ||
|
|
||
| WORKDIR /app | ||
|
|
||
|
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 hardcoded path |
||
| COPY --from=builder /usr/local/lib /usr/local/lib | ||
| 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,13 @@ | ||
| # ToDo App — Docker Instructions | ||
|
|
||
| ## Docker Hub | ||
| https://hub.docker.com/r/1ntact/todoapp | ||
|
|
||
| ## Build the image | ||
| docker build -t 1ntact/todoapp:1.0.0 . | ||
|
|
||
| ## Run the container | ||
| docker run -d -p 8080:8080 --name todoapp 1ntact/todoapp:1.0.0 | ||
|
|
||
| ## Access the application | ||
| Open your browser and go to: http://localhost:8080 |
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 INSTRUCTION.md build command tags the image as 'todoapp', but the run command expects '1ntact/todoapp:1.0.0'. To match the instructions, the build command should be:
docker build -t 1ntact/todoapp:1.0.0 .