You are here

docker-compose-in-docker.sh in Realistic Dummy Content 7.2

Same filename and directory in other branches
  1. 8.2 developer/docker-compose-in-docker.sh
#!/bin/bash
#
# Use ./docker-compose-in-docker.sh ... instead of docker-compose ...
# We do not want to make assumptions about whether or not docker-compose
# is installed on a given platform (for example CoreOS does not have
# docker-compose). In keeping with the philosophy of Docker of keeping
# every dependency in a container, docker-compose being a dependency, we
# use it within a container.
#
# See https://hub.docker.com/r/docker/compose.
# At the time of this writing there is no "latest" tag for the image, so
# we manually entered the latest version, which can be changed of required.
#

docker run \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v "$PWD:/rootfs/$PWD" \
  -w="/rootfs/$PWD" \
  docker/compose:1.17.0 "$@"

File

developer/docker-compose-in-docker.sh
View source
  1. #!/bin/bash
  2. #
  3. # Use ./docker-compose-in-docker.sh ... instead of docker-compose ...
  4. # We do not want to make assumptions about whether or not docker-compose
  5. # is installed on a given platform (for example CoreOS does not have
  6. # docker-compose). In keeping with the philosophy of Docker of keeping
  7. # every dependency in a container, docker-compose being a dependency, we
  8. # use it within a container.
  9. #
  10. # See https://hub.docker.com/r/docker/compose.
  11. # At the time of this writing there is no "latest" tag for the image, so
  12. # we manually entered the latest version, which can be changed of required.
  13. #
  14. docker run \
  15. -v /var/run/docker.sock:/var/run/docker.sock \
  16. -v "$PWD:/rootfs/$PWD" \
  17. -w="/rootfs/$PWD" \
  18. docker/compose:1.17.0 "$@"