Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker configuration #102

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Prevent to build image and cache twice
rodfersou committed Jul 17, 2020

Verified

This commit was signed with the committer’s verified signature.
veritem Verité Mugabo
commit f85cb86984c39b88e5dfcbec658597bc63390ef3
14 changes: 11 additions & 3 deletions Makefile.docker
Original file line number Diff line number Diff line change
@@ -3,9 +3,13 @@ docker-build: docker-build-backend docker-build-frontend ## Build with Docker

docker-build-backend:
@echo "$(GREEN)==> Setup Build with Docker$(RESET)"
# docker-compose build
docker-compose run --rm backend "mkdir -p /app/cache/eggs /app/cache/downloads/list /app/cache/extends" || true
docker-compose run --rm backend "cd /app/cache/eggs && find /plone/buildout-cache/eggs/* -maxdepth 0 -type d -exec ln -sf {} . \;" || true
if [[ "$$(docker images -q plone-tools:5.2.1 2> /dev/null)" == "" ]]; then \
docker build -t plone-tools:5.2.1 . ; \
fi
if [ ! -d cache ]; then \
docker-compose run --rm backend "mkdir -p /app/cache/eggs /app/cache/downloads/list /app/cache/extends" || true ; \
docker-compose run --rm backend "cd /app/cache/eggs && find /plone/buildout-cache/eggs/* -maxdepth 0 -type d -exec ln -sf {} . \;" || true ; \
fi
docker-compose run --rm backend "make build-backend"

docker-build-frontend:
@@ -61,3 +65,7 @@ docker-test-frontend:
docker-clean:
@echo "$(RED)==> Cleaning Docker environment$(RESET)"
docker-compose down
if [[ "$$(docker images -q plone-tools:5.2.1 2> /dev/null)" != "" ]]; then \
docker image rm plone-tools:5.2.1 ; \
fi
make clean
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: '2'
services:
plone-tools:
image: plone-tools:5.2.1
build: .
backend:
image: plone-tools:5.2.1
user: plone