https://github.com/softonic/get-compose-images
It returns a JSON structure with the images to build in the equivalent `docker-compose xxxx build` command
https://github.com/softonic/get-compose-images
build docker docker-compose
Last synced: about 1 month ago
JSON representation
It returns a JSON structure with the images to build in the equivalent `docker-compose xxxx build` command
- Host: GitHub
- URL: https://github.com/softonic/get-compose-images
- Owner: softonic
- License: other
- Created: 2020-01-28T10:53:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-06T13:06:18.000Z (over 6 years ago)
- Last Synced: 2025-04-08T07:43:56.377Z (about 1 year ago)
- Topics: build, docker, docker-compose
- Language: Dockerfile
- Homepage: https://hub.docker.com/repository/docker/softonic/get-compose-images
- Size: 4.88 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# get-compose-images
It returns a JSON structure with the images to build in the equivalent `docker-compose xxxx build` command.
This is useful to detect what are the images to build and use this info anywhere, for example for asynchronous
image scan.
## Usage
You need to execute the image mounting the desired file or directory that contains the docker compose data and the
environment parameters you need for the expected compose output.
For example:
```bash
docker run --rm \
-v ${PWD}:/code:ro -it \
-e COMPOSE_FILE=docker-compose.sample.yml \
-e VERSION=1.0.0-test \
-e NGINX_VERSION=3.4.5
softonic/get-compose-images:latest
```
```json
[
{
"service": "docs",
"image": "my.registry.io/magic-api/docs:1.0.0-test",
"dockerfile": "docker/docs/Dockerfile"
},
{
"service": "nginx",
"image": "my.registry.io/magic-api/nginx:3.4.5",
"dockerfile": "docker/nginx/Dockerfile"
},
{
"service": "php-fpm",
"image": "my.registry.io/magic-api/php-fpm:1.0.0-test",
"dockerfile": "docker/php-fpm/Dockerfile"
}
]
```