forked from extern/podman-compose
a test showing yaml anchor magic
This commit is contained in:
parent
813dc8b149
commit
f505e499a2
@ -386,6 +386,8 @@ def mount_desc_to_args(compose, mount_desc, srv_name, cnt_name):
|
||||
proj_name = compose.project_name
|
||||
shared_vols = compose.shared_vols
|
||||
if is_str(mount_desc): mount_desc=parse_short_mount(mount_desc, basedir)
|
||||
# not needed
|
||||
# podman support: podman run --rm -ti --mount type=volume,source=myvol,destination=/delme busybox
|
||||
mount_desc = mount_dict_vol_to_bind(compose, fix_mount_dict(mount_desc, proj_name, srv_name))
|
||||
mount_type = mount_desc.get("type")
|
||||
source = mount_desc.get("source")
|
||||
|
34
tests/yamlmagic/docker-compose.yml
Normal file
34
tests/yamlmagic/docker-compose.yml
Normal file
@ -0,0 +1,34 @@
|
||||
version: '3.6'
|
||||
|
||||
x-deploy-base: &deploy-base
|
||||
restart_policy:
|
||||
delay: 2s
|
||||
|
||||
x-common: &common
|
||||
network: host
|
||||
deploy:
|
||||
<<: *deploy-base
|
||||
networks:
|
||||
hostnet: {}
|
||||
|
||||
networks:
|
||||
hostnet:
|
||||
external: true
|
||||
name: host
|
||||
|
||||
volumes:
|
||||
node-red_data:
|
||||
|
||||
services:
|
||||
node-red:
|
||||
<<: *common
|
||||
image: busybox
|
||||
command: busybox httpd -h /data -f -p 8080
|
||||
deploy:
|
||||
<<: *deploy-base
|
||||
resources:
|
||||
limits:
|
||||
cpus: '0.5'
|
||||
memory: 32M
|
||||
volumes:
|
||||
- node-red_data:/data
|
Loading…
Reference in New Issue
Block a user