collective / cookiecutter-plone-starter

Cookiecutter Plone Starter is a framework for jumpstarting Plone 6 projects quickly.
MIT License
21 stars 12 forks source link

Fails when Docker is not running #125

Closed tisto closed 9 months ago

tisto commented 9 months ago

When running cookiecutter-plone-starter without Docker daemon running it fails:

pipx run cookiecutter gh:collective/cookiecutter-plone-starter
⚠️  cookiecutter is already on your PATH and installed at
    /opt/homebrew/bin/cookiecutter. Downloading and running anyway.
You've downloaded /Users/timo/.cookiecutters/cookiecutter-plone-starter before. Is
it okay to delete and re-download it? [y/n] (y): y

Cookiecutter Plone Starter
================================================================================

Sanity checks
--------------------------------------------------------------------------------
  [1/5] Python: ✓
  [2/5] Node: ✓
  [3/5] yo: ✓
  [4/5] Docker: ✓
  [5/5] git: ✓

Project details
--------------------------------------------------------------------------------

  [1/19] Project Title (Project Title): Plone Distribution EDU (Frontend)
  [2/19] Project Description (A new project using Plone 6.):
  [3/19] Project Slug (Used for repository id) (plone-distribution-edu-frontend):
  [4/19] Project URL (without protocol)
(plone-distribution-edu-frontend.example.com):
  [5/19] Author (Plone Foundation):
  [6/19] Author E-mail (collective@plone.org):
  [7/19] Python Package Name (plone_distribution_edu_frontend):
  [8/19] Volto Addon Name (volto-plone-distribution-edu-frontend):
  [9/19] Choose a Python Test Framework
    1 - pytest
    2 - unittest
    Choose from [1/2] (1):
  [10/19] Plone Version (6.0.10):
  [11/19] Should we use Volto Alpha Versions? (No): Yes
  [12/19] Volto Version (18.0.0-alpha.18):
  [13/19] Volto Generator Version (9.0.0-alpha.9):
  [14/19] Language
    1 - English
    2 - Deutsch
    3 - Español
    4 - Português (Brasil)
    5 - Nederlands
    6 - Suomi
    Choose from [1/2/3/4/5/6] (1): 2
  [15/19] GitHub Username or Organization (collective):
  [16/19] Container Registry
    1 - GitHub Container Registry
    2 - Docker Hub
    Choose from [1/2] (1):
  [17/19] Should we setup a caching server?
    1 - Yes
    2 - No
    Choose from [1/2] (1):
  [18/19] Add Ansible playbooks?
    1 - Yes
    2 - No
    Choose from [1/2] (1):
  [19/19] Add GitHub Action to Deploy this project?
    1 - Yes
    2 - No
    Choose from [1/2] (1):

Plone Distribution EDU (Frontend) generation
--------------------------------------------------------------------------------

Summary:
  - Plone version: 6.0.10
  - Volto version: 18.0.0-alpha.18
  - Volto Generator version: 9.0.0-alpha.9
  - Output folder: /Users/timo/workspace/plone/plone-distribution-edu-frontend

Frontend codebase:
 - Installing required npm packages
 - Generate frontend application with @plone/volto 18.0.0-alpha.18

Backend codebase
 - Remove folder src/plone_distribution_edu_frontend/src/plone_distribution_edu_frontend/tests not used by pytest
 - Format generated code in the backend

Error while running ['make', 'format']:
docker: Cannot connect to the Docker daemon at unix:///Users/timo/.docker/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.
make: *** [format] Error 125

ERROR: Stopping generation because post_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
➜  plone ls

It would be super nice if there would be a check up-front that checks if Docker is running or if cookiecutter would not fail but wait for you to start docker.

davisagli commented 9 months ago

Duplicate of #79