aio-libs / aiodocker

Python Docker API client based on asyncio and aiohttp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to create image from local Dockerfile

hasanozdem1r opened this issue · comments

commented

Create image from local Dockerfile

Hi, I would like to create a docker image from local dockerfile.
How should I do it ? Please could you give me a fast example ?
How should I use build command to create image from local dockerfile

Your environment

Windows 10 Pro
Python 3.8.3

It's not really related to aiodocker
You can do it like any other dockerized python app.
just add aiodocker to dependency file like requirements.txt or pipfile & add RUN script to install the packages in Dockerfile

requirements.txt

aiodocker==0.21.0

Dockerfile

FROM python

COPY requirements.txt .

RUN pip install -r requirements.txt

CMD ["python", "main.py"]
commented

Unsolved