Reorganize both dev and prod container builds

Use only one (templated) docker file for both builds.

Move to two-stage container builds in order to save space in the
final image.
This commit is contained in:
Bill Nottingham
2020-05-12 23:37:44 -04:00
committed by Shane McDonald
parent a057277823
commit 66245d3094
5 changed files with 165 additions and 206 deletions

View File

@@ -652,6 +652,7 @@ docker-compose-clean: awx/projects
# Base development image build
docker-compose-build:
ansible localhost -m template -a "src=installer/roles/image_build/templates/Dockerfile.j2 dest=tools/docker-compose/Dockerfile" -e build_dev=True
docker build -t ansible/awx_devel -f tools/docker-compose/Dockerfile \
--cache-from=$(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG) .
docker tag ansible/awx_devel $(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG)