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.8

FROM python:${PYTHON_VERSION} as base


WORKDIR /app

COPY . ./


FROM python:${PYTHON_VERSION}-slim

WORKDIR /app

ENV PYTHONUNBUFFERED=1

COPY --from=base /app .

RUN pip install --upgrade pip && \
pip install -r requirements.txt && \
python manage.py migrate

EXPOSE 8080

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

## How to build image:
```
docker build -t todoapp:1.0.0 .
```

## How to run container using local image:
```
docker run -p 8080:8080 todoapp:1.0.0
```
# How to run container using image from DockerHub:
```
docker run -p 8080:8080 andriyshafran/todoapp
```

## Access the application via a browser:

```
http://127.0.0.1:8080
```
Loading