mirror of
https://github.com/Red5d/docker-autocompose
synced 2026-01-03 07:08:01 +00:00
Merge pull request #2 from mogensen/master
Adding Dockerfile to run docker-autocompose as a container
This commit is contained in:
9
Dockerfile
Normal file
9
Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM python:3
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN python ./setup.py install
|
||||
|
||||
ENTRYPOINT [ "python", "./autocompose.py" ]
|
||||
10
README.md
10
README.md
@@ -16,3 +16,13 @@ Outputs a docker-compose compatible yaml structure.
|
||||
While experimenting with various docker containers from the Hub, I realized that I'd started several containers with complex options for volumes, ports, environment variables, etc. and there was no way I could remember all those commands without referencing the Hub page for each image if I needed to delete and re-create the container (for updates, or if something broke).
|
||||
|
||||
With this tool, I can easily generate docker-compose files for managing the containers that I've set up manually.
|
||||
|
||||
## Docker Usage
|
||||
|
||||
Build container by running:
|
||||
|
||||
docker build -t docker-autocompose .
|
||||
|
||||
Use the new image to generate a docker-compose file from a running container:
|
||||
|
||||
docker run -v /var/run/docker.sock:/var/run/docker.sock docker-autocompose $container-id
|
||||
|
||||
Reference in New Issue
Block a user