mirror of
https://github.com/Balshgit/python-poetry.git
synced 2026-03-21 22:00:37 +03:00
add docker build instruction
This commit is contained in:
18
README.md
18
README.md
@@ -2,18 +2,24 @@
|
||||
|
||||
Used for poetry packages management with docker
|
||||
|
||||
required `docker` and `docker-compose`
|
||||
required `docker` and optionally `docker-compose`
|
||||
|
||||
|
||||
## Poetry lock for any version
|
||||
## Generate poetry lock for any version
|
||||
|
||||
- copy `pyproject.toml` file to poetry dir
|
||||
- set `python` version the same as in `pyproject.toml` and set `poetry` versions in Dockerfile
|
||||
- copy `pyproject.toml` file to `poetry` dir
|
||||
- In Dockerfile set `python` version the same as in `pyproject.toml` and `poetry` version which will be used
|
||||
|
||||
run
|
||||
|
||||
### Run from docker:
|
||||
|
||||
```bash
|
||||
docker build --build-arg USER=$USER -t poetry-python . && docker run --rm -u $USER -v $PWD/poetry:/poetry poetry-python
|
||||
```
|
||||
|
||||
### Or from docker-compose:
|
||||
```bash
|
||||
docker-compose up --build
|
||||
```
|
||||
|
||||
script will generate `poetry.lock` and `requirements.txt` files
|
||||
script will generate `poetry.lock` and `requirements.txt` files in `poetry` directory
|
||||
Reference in New Issue
Block a user