Update README.md

This commit is contained in:
bjoernellens1 2023-10-23 10:30:09 +02:00 committed by GitHub
parent a7edc9ea29
commit e0ec0cd74e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,21 +9,29 @@ These are yaml files containing the repositories you may want to include into yo
For a multi-stage build for instance, I define my base image repositories in "my.repos" and the extended image repositories in "my_extended.repos" For a multi-stage build for instance, I define my base image repositories in "my.repos" and the extended image repositories in "my_extended.repos"
## To build the image for example_service (and push it to your container registry): ## To build the image for example_service (and push it to your container registry):
''' ```
docker buildx bake example_service --load # to load into local container registry docker buildx bake example_service --load # to load into local container registry
docker buildx bake example_service --push # to push into specified remote container registry docker buildx bake example_service --push # to push into specified remote container registry
''' ```
## To run example_service: ## To run example_service:
### Run example_service in background ### Run example_service in background
```
docker compose up -d example_service docker compose up -d example_service
```
### Run example_service in foreground ### Run example_service in foreground
```
docker compose up example_service docker compose up example_service
```
### Execute shell inside example_service ### Execute shell inside example_service
#### If container is stopped #### If container is stopped
```
docker compose run example_service bash docker compose run example_service bash
```
#### If container is already running #### If container is already running
```
docker compose exec example_service bash docker compose exec example_service bash
```
### Execute example_program inside example_service ### Execute example_program inside example_service
```
docker compose run example_service example_program docker compose run example_service example_program
```