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
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG PYTHON_VERSION=3.10-slim
FROM python:${PYTHON_VERSION} AS builder

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libc-dev \
Comment on lines +1 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

INSTRUCTION.md is incomplete - Missing instructions for: 1) Pushing image to Docker Hub (docker push volodymyrlp/todoapp:1.0.0), 2) Running the container (docker run -p 8080:8080 todoapp:1.0.0), 3) Accessing the app via browser (http://localhost:8080). These are explicitly required by items #12 and #13 of the task description.

&& rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt


FROM python:${PYTHON_VERSION}

ENV PYTHONUNBUFFERED=1
WORKDIR /app

COPY --from=builder /root/.local /root/.local
COPY . .

ENV PATH=/root/.local/bin:$PATH

RUN python manage.py migrate

EXPOSE 8080

CMD ["python", "manage.py", "runserver", "0.0.0.0:8080"]
8 changes: 8 additions & 0 deletions INSTRUCTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# ToDo Application Docker Instructions

## Docker Hub Repository
[https://hub.docker.com/r/volodymyrlp/todoapp](https://hub.docker.com/r/volodymyrlp/todoapp)

## How to Build the Container
```bash
docker build -t todoapp:1.0.0 .
Comment on lines +1 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

INSTRUCTION.md is missing the docker run command and instructions for accessing the application via browser (e.g., http://localhost:8080). Add these sections to complete the instructions as required.

Loading