Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I persuade Bitbucket Pipelines that my docker config is correct?

kenkinder March 1, 2019

I have a bitbucket pipeline with a definitions section like so:

definitions:
services:
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: [redacted]
MYSQL_DATABASE: [redacted]
MYSQL_USER: [redacted]
MYSQL_PASSWORD: [redacted]
ports:
- "3306:3306"

This works just fine and the pipeline executes as normal. However, the BitBucket code editor seems to erroneously believe the file is incorrect:

Screenshot from 2019-03-01 10.40.19.pngIs there a solution for that?

 

2 answers

1 vote
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2019

Hi @kenkinder ,

It might be due to the commands not being supported for configuration.

Based on this documentation Use services and databases in Bitbucket Pipelines  i'm seeing differences.

0 votes
Philip Hodder
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 4, 2019

Hi Ken,

Bitbucket Pipelines has its own YAML configuration. It looks like you're trying to reuse the one defined on the Dockerhub readme? You cannot combine the stack.yml format with the bitbucket-pipelines.yml format.

The 'restart' and 'ports' properties shouldn't be necessary for you here. See how you go without them. 

Thanks,

Phil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events