Docker-Wrapper for Composerize

Max Großmann
1 min readMar 13, 2022

--

Photo by Philippe Oursel on Unsplash

What is composerize?

Composerize is an open source project and npm package for converting docker run commands into a docker-compose file.

You can also use the corresponding website to convert ad hoc.

That is composerize-docker?

I have build the project composerize-docker on top of composerize. This project simply wraps the nodejs package inside a docker image so that you don’t have to care about the right nodejs und library version.

How to get started?

I asume that you are working in a unix-based environment. (Linux, MacOS, WSL, ...) You get the best user experience if you create a function e.g. in your .bashrc or .zshrc with the following content:

composerize() {
docker run -it maaxgr/composerize:1.0.6 composerize "$@"
}

After restarting your shell, you should be able to run the composerize function.

Here is an example how to convert a docker run command to docker-compose:

composerize docker run -d --name web1 --net mynetwork jmalloc/echo-server:latest

--

--

Max Großmann
Max Großmann

Written by Max Großmann

Software Development, Linux Administrator

No responses yet