Turns docker run commands into docker-compose files!
composerize-plus can be run in the cli.
npm install composerize-plus -g
to install, and run as such:
$ composerize-plus docker run -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --restart always --log-opt max-size=1g nginx
Append several docker run commands using '+' operator.
$ composerize-plus docker run -it --name dind -v /var/run/docker.sock:/var/run/docker.sock wondercode/dind + docker run -d --name metabase -p 3000:3000 random/metabase
Use the docker image.
$ docker run --rm wondercode/composerize-plus:1.1.0 docker run -d --name metabase -p 3000:3000 metabase/metabase
$ alias composerize-plus="docker run --rm wondercode/composerize-plus:1.1.0"
and run:
$ composerize-plus docker run -d --name metabase -p 3000:3000 metabase/metabase
Save the generated docker-compose to a file:
$ composerize-plus docker run -d --name metabase -p 3000:3000 metabase/metabase > docker-compose.yml
This feature is available from version 1.2.1.
$ composerize-plus portainer + a51e784c42be > docker-compose.yml
In order to use this feature with the docker image wondercode/composerize-plus:1.2.1 you must to mount /var/run/docker.sock into the container, as follows:
$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock wondercode/composerize-plus:1.2.1 a51e784c42be > docker-compose.yml
- Clone a fork of the repo and install the project dependencies by running
yarn install
- Make your changes, and build the project by running
yarn build
- Test your changes with
yarn test
- Full support of docker run command options.
- Run composerize-plus using a file containing docker run commands.
- Create Electron app.