From 0a15f6877e4609afee26e74341ea0b898d6701ce Mon Sep 17 00:00:00 2001 From: Peter Demin Date: Wed, 23 Nov 2022 13:41:18 -0500 Subject: [PATCH] make lock-docker upgrade-docker --- .gitignore | 1 + Dockerfile | 5 +++++ Makefile | 13 +++++++++++++ 3 files changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index fd2a3f6..2cf7ec9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.py[cod] /.env/ +/.venv*/ # C extensions *.so diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..151dbf8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:20.04 + +RUN apt-get update -y && apt-get install -y python3.8-venv make + +WORKDIR /pcm diff --git a/Makefile b/Makefile index 4a86834..311b2b5 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,18 @@ sync: requirements/local.hash virtual_env_set pip-sync requirements/local.hash pip install -e . --no-deps +.PHONY: %-docker +%-docker: ## Could be lock-docker or upgrade-docker + docker run --rm -it -v $(PWD):/pcm $$(docker build -q .) /usr/bin/make $*-ubuntu + +.PHONY: %-ubuntu +%-ubuntu: .venv38 + .venv38/bin/python3 -m pip install tox + .venv38/bin/python3 -m tox -e $* + +.venv38: + python3.8 -m venv .venv38 + .PHONY: lock lock: virtual_env_set tox -e lock @@ -31,6 +43,7 @@ test: .PHONY: clean clean: rm -rf build dist pip-compile-multi.egg-info docs/_build + rm -rf .venv38 find . -name "*.pyc" -delete find * -type d -name '__pycache__' | xargs rm -rf