Wait until docker container is Ready in circleci

276 Views Asked by At

I defined start_selenium like this

start_selenium: &start_selenium
    name: Download & Run Selenium Stand alone Server
    command: |
      curl -O https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
      java -jar selenium-server-standalone-3.141.59.jar -log selenium.log
      java --version
    background: true

And also jobs like this

jobs: 
  docker:

  - image: circleci/php:7.2.30      
  - image: circleci/openjdk
  - image: circleci/mariadb:10.3
  steps:
      - run: *start_selenium

But the problem is start_selenium runs before docker image is ready and it says 'java' command is not defined.

0

There are 0 best solutions below