Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Simulate Docker ?

xicond January 5, 2024

I have docker mysql run manually inside pipeline step

How can I simulate that in local ?


```

dusk:
      - step:
          name: Test
          image: xicond/bitbucket-pipeline:74
          script:
            - docker run --name mysql -v $BITBUCKET_CLONE_DIR/laradock/mysql/conf.d:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=$DB_PASSWORD -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_DATABASE -dip 3306:3306 mysql:5.7      # json support + oracle 122.43 MB Assuming your configuration is located in /mysql/conf.d in your repository
            - apk add wget; wget --retry-connrefused --tries=100 -q --wait=1 --spider localhost:3306
            - COMPOSER_POOL_OPTIMIZER=2 COMPOSER_ALLOW_SUPERUSER=1 composer install
          caches:
            - vendor
          services:
            - docker
```

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 8, 2024

Hey @xicond 

By local, do you mean running the steps below on your local machine? If yes, please check our KB below, which outlines the steps to reproduce the issue locally in the pipeline. It should be similar to what you wish:

Troubleshoot failed Bitbucket Pipelines locally with Docker 

Regards,
Syahrul

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events