I've created a custom docker image as follows, and pushed it to a custom repo:
# Use php as parent imageFROM ruby:2.4-slim# Install core prerequisitesRUN apt-get update && apt-get install -y php5.6 python-pip python-dev build-essential zip software-properties-common wget# Install awscliRUN pip install awscli
Then I've added this custom image to my bitbucket-pipelines.yml like so:
image:name: xxx/adzooma-ruby:v1username: $DOCKER_HUB_USERNAMEpassword: $DOCKER_HUB_PASSWORDpipelines:tags:release-*:- step:script:- wget https://wordpress.org/latest.tar.gz...
My pipeline immediately fails when run due to:
+ wget https://wordpress.org/latest.tar.gzbash: wget: command not found
This sort of makes me think that actually my docker image isn't being used at all since I explicitly install wget in the image - so is my pipeline syntax correct or am I missing a step here?
Best Answer
You've have to define e-mail address too.
image:name: account-name/openjdk:8username: $DOCKER_HUB_USERNAMEpassword: $DOCKER_HUB_PASSWORDemail: $DOCKER_HUB_EMAIL
See: https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html
I've faced nearly the same issue with yours. The cause of my problem is, docker container registry somehow cannot capture the changes on my locally build docker image. To overcome the issue I've deleted images both on my local machine and my private docker container registry. Rebuild and Repush solved my problem. Maybe this can work for you too.