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
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG PYTHON_VERSION=3.11

FROM python:${PYTHON_VERSION} as builder

WORKDIR /app

Comment on lines +4 to +6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The build instruction uses docker build -t todoapp ., but the task requires naming and pushing the image as todoapp:1.0.0 to Docker Hub (Checklist #5 and #6). Update this section to include tagging (e.g. docker build -t todoapp:1.0.0 .) and the push command.

COPY requirements.txt .

RUN pip install --no-cache-dir --prefix=/install -r requirements.txt

FROM python:${PYTHON_VERSION}-slim
Comment on lines +9 to +11

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Similarly, the run example uses the untagged todoapp image, while the requirements specify todoapp:1.0.0. It would be better to show docker run -p 8080:8080 todoapp:1.0.0 so the instructions match the required tag.


ENV PYTHONUNBUFFERED=1

WORKDIR /app

COPY --from=builder /install /usr/local

COPY . .

RUN python manage.py migrate

EXPOSE 8080

CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
20 changes: 20 additions & 0 deletions INSTRUCTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Docker Hub
https://hub.docker.com/repository/docker/klptu/todoapp/general

## Збірка образу
```bash
docker build -t klptu/todoapp:1.0.0 .
```

## Пуш на Docker Hub
```bash
docker push klptu/todoapp:1.0.0
```

## Запуск контейнера
```bash
docker run -p 8080:8080 klptu/todoapp:1.0.0
```

## Відкрити в браузері
Після запуску відкрий http://localhost:8080
Loading