Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rubensworks/lerna-docker
🛠️ A simple tool for easily building and publishing Docker images inside Lerna monorepos
https://github.com/rubensworks/lerna-docker
Last synced: about 2 months ago
JSON representation
🛠️ A simple tool for easily building and publishing Docker images inside Lerna monorepos
- Host: GitHub
- URL: https://github.com/rubensworks/lerna-docker
- Owner: rubensworks
- License: other
- Created: 2020-03-04T08:55:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T15:23:14.000Z (7 months ago)
- Last Synced: 2024-07-01T18:38:29.105Z (3 months ago)
- Language: Shell
- Size: 9.77 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Lerna Docker
A simple tool for easily building and publishing [Docker](https://www.docker.com/) images inside [Lerna](https://lernajs.io/) monorepos.
Features:
* Building Docker images for all packages that have a Dockerfile.
* Pushing Docker images to Docker hub based.
* Automatic Docker hub authentication for running in CI environments.## Requirements
* [Bash](https://www.gnu.org/software/bash/) _(Installed by default on UNIX machines)_
* [Docker](https://www.docker.com/)
* [A Lerna project](https://lernajs.io/)## Install
### Automatically
This will automatically clone this repo into `$HOME/.lerna-docker` (_requires [git](https://git-scm.com/)_),
and adds this tool to your `$PATH`.```bash
$ sh -c "`curl -fsSl https://raw.githubusercontent.com/rubensworks/lerna-docker/master/install.sh`"
```If you want to uninstall later, just remove `$HOME/.lerna-docker` and the `$PATH` modification in `~/.bash_profile`.
### Manually
First, clone this repo somewhere:
```bash
$ git clone [email protected]:rubensworks/lerna-docker.git
```Then, add the `/bin` folder to your `$PATH`.
For example, by adding the following to your `~/.bash_profile````bash
export PATH="/path/to/lerna-docker/bin:$PATH"
```## Usage
All actions allow a custom version tag to be passed.
If no version is given, then either a version based on `$TRAVIS_TAG` or `"DEV"` will be assigned.### Building
Build all Dockerfiles that can be found in `packages/*`:
```bash
$ lerna-docker my-docker-organization build [version-tag]
```### Pushing
Pushing all images to Docker hub based on the Dockerfiles that can be found in `packages/*`:
```bash
$ lerna-docker my-docker-organization push [version-tag]
```If you want to push in a CI environment,
you will have to log in to a Docker Hub account,
which can be done by setting the (secret) environment variables `DOCKER_USERNAME` and `DOCKER_PASSWORD`.## License
This code is copyrighted by [Ghent University – imec](http://idlab.ugent.be/)
and released under the [MIT license](http://opensource.org/licenses/MIT).