You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
384 B

  1. #!/bin/bash
  2. . ./_docker-cmd.sh || {
  3. echo "no docker cmd is presented" && exit 1
  4. }
  5. PHP_VERSION=$1 # Without dot
  6. if [[ -z "${PHP_VERSION}" ]]; then PHP_VERSION=74; fi
  7. CONTAINER=$(docker ps | grep workspace${PHP_VERSION} | awk '{print $1}')
  8. if [[ -z "${CONTAINER}" ]]; then
  9. echo "Unable to find container: workspace${PHP_VERSION}"
  10. exit 1
  11. fi
  12. $DOCKER_CMD exec -ti ${CONTAINER}