About | Technologies | Let's start | License | Author
Cookiecutter in a docker container based on alpine 3.19.
This repository and the associated Docker image are designed to help developers get started quickly and work with cookiecutters.
Joomla! Templates for Cookiecutter1
🚀 Cookiecutter Templates for Joomla! cookiecutter-joomla 🚧 Under construction... 🚧
Discover a variety of ready-to-use templates on GitHub.
Filterd list for PHP templates on GitHub
Thank you, Audrey Roy Greenfeld, for the great idea, implementation and maintenance of this very useful command-line utility and to make it available to the open source community.
- Cookiecutter - an open source library for building coding project templates.
- Docker
Pull the docker image
docker pull ghcr.io/simplysmart-it/cookiecutter-docker:alpine-13.9.1
Use a Cookiecutter project template directly from a repository to start your new project.
docker run -it --rm \
-e TEMPLATE=gh:simplysmart-it/cookiecutter-joomla \
-e OUT_DIR=/cookie_out \
-v $PWD:/cookie_out \
ghcr.io/simplysmart-it/cookiecutter-docker:alpine-13.9.1
This command runs Cookiecutter in your container and generates a new project in your current working directory based on the Github repository which you specified in the variable TEMPLATE
.
Cookiecutter knows abbreviations for Github (gh), Bitbucket (bb), and GitLab (gl) projects, but you can also give it the full URL to any repository. Read more about this topic directly in the Cookiecutter documentation..
You can also check out a specific branch by adding and filling the variable CHECKOUT
with the branch name.
docker run -it --rm \
-e TEMPLATE=gh:simplysmart-it/cookiecutter-joomla \
-e OUT_DIR=/cookie_out \
-e CHECKOUT=main \
-v $PWD:/cookie_out \
ghcr.io/simplysmart-it/cookiecutter-docker:alpine-13.9.1
Some repositories are organized hierarchically and contain more than one template. You can generate your project from a subfolder of the repository by adding and filling the variable DIRECTORY
with the folder name.
docker run -it --rm \
-e TEMPLATE=git+ssh://[email protected]/simplysmart-it/cookiecutter-joomla \
-e OUT_DIR=/cookie_out \
-e DIRECTORY=plugin \
-v $PWD:/cookie_out \
ghcr.io/simplysmart-it/cookiecutter-docker:alpine-13.9.1
It is also possible to combine the variables DIRECTORY
and CHECKOUT
to get a subfolder from a specific branch.
You can also use a local folder or a previously cloned local repository.
- MOUNT your local directory with the Cookiecutter template
-v YOUR-LOCAL-FOLDER-PATH:/cookie_in
- FILL the
TEMPLATE
variable with the directory in your docker container that is mounted to the folder outsideTEMPLATE=/cookie_in
docker run -it --rm \
-e TEMPLATE=/cookie_in \
-e OUT_DIR=/cookie_out \
-v $PWD:/cookie_out \
-v YOUR-LOCAL-FOLDER-PATH:/cookie_in \
ghcr.io/simplysmart-it/cookiecutter-docker:alpine-13.9.1
If you use Cookiecutter a lot, it can be handy to set up a global configuration. This way, you can define the repeating params once and then use them wherever you need to without having to enter them again.
- Example user config e.g.
~/cookiecutter-global.yaml
default_context:
author: "Your Full Name"
author_email: "[email protected]"
author_company: "Example Company"
author_url: "https://www.example.local"
namespace: "YourNamespace"
- MOUNT your local user config e.g.
~/.cookiecutterrc
or any other yaml config file into the Cookiecutter container-v YOUR-LOCAL-FOLDER-PATH/cookiecutter-global.yaml:/cookie_config/.cookiecutterrc
docker run -it --rm \
-e TEMPLATE=gh:simplysmart-it/cookiecutter-joomla \
-e OUT_DIR=/cookie_out \
-e CHECKOUT=main \
-v $PWD:/cookie_out \
-v YOUR-LOCAL-FOLDER-PATH/cookiecutter-global.yaml:/cookie_config/.cookiecutterrc \
ghcr.io/simplysmart-it/cookiecutter-docker:alpine-13.9.1
This project is under GNU General Public License version 3 or later;. For more details, see the LICENSE file.
Made with ❤️ by Martina Scholz
Would you like to support me and my future developments?!? 🎉 🚀 Thank you !!! ❤️
Footnotes
-
This project is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc. ↩