Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ARG PYTHON_VERSION=3.8
FROM python:${PYTHON_VERSION} AS base
WORKDIR /app
COPY . .
ARG PYTHON_VERSION=3.8
FROM python:${PYTHON_VERSION}-slim

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid docker build syntax: The -t flag requires a value immediately after it. The --name flag is for container names, not image names. Should be: docker build -t todoapp:1.0.0 .

WORKDIR /app
ENV PYTHONUNBUFFERED=1
COPY --from=base /app .
RUN pip install -r requirements.txt
RUN python manage.py migrate
EXPOSE 8080

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Port mismatch: EXPOSE declares 8080 but runserver is configured to run on port 8000. This contradicts requirement #7 which specifies 0.0.0.0:8080 for runserver. Either change runserver to 0.0.0.0:8080 or change EXPOSE to 8000.

ENTRYPOINT ["python", "manage.py", "runserver", "0.0.0.0:8080"]
11 changes: 11 additions & 0 deletions instruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Download image:
https://hub.docker.com/r/dmytro1970/todoapp:1.0.0

For building:
docker build -t todoapp:1.0.0 .

For run container:
docker run -d -p 8080:8080 todoapp:1.0.0

For brauser:
http://localhost:8080
Loading