mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Refactor Dockerfiles
This commit does a few things: - Add the `--squash` option to the `awx-devel-build` make target. This reduces the resulting image size from 2.12 GB to 1.37 GB. I think we can get this down even more by inspecting the image contents. - Reorganize commands so that the cache expires less often. Before this commit, any changes to the Makefile would essentially cause the entire image to rebuild. - Break yum dependencies up into multiple lines. This makes it easier to see what changes in a diff. - Use `n` to install our required version of node (rather `curl node | bash`). I’ve found this to be easier to maintain / more portable when working with other Dockerfiles. - General organizational changes to make things easier to parse visually.
This commit is contained in:
4
Makefile
4
Makefile
@@ -590,7 +590,9 @@ docker-compose-build: awx-devel-build
|
||||
|
||||
# Base development image build
|
||||
awx-devel-build:
|
||||
docker build -t ansible/awx_devel -f tools/docker-compose/Dockerfile .
|
||||
# To enable the 'experimental' features in Docker:
|
||||
# https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file
|
||||
docker build --squash -t ansible/awx_devel -f tools/docker-compose/Dockerfile .
|
||||
docker tag ansible/awx_devel $(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG)
|
||||
#docker push $(DEV_DOCKER_TAG_BASE)/awx_devel:$(COMPOSE_TAG)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user