Multiple docker builds in same repository

Dave Albert
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 6, 2018

Is it possible to build multiple docker images based on one repository?

 

For example say I have the following:

 

/Dockerfile

/bitbucket-pipelines.yml

/app/app.js

/bot/Dockerfile

/bot/bot.js

 

I want to build one or both (depending on tags, but will accept both or a specific one based on settings) the `/Dockerfile` and the `/bot/Dockerfile` images.

 

Is that possible?  I have the `/Dockerfile` building properly, but can't figure out how to build the bot also.

 

 

my current pipeline file:

pipelines:
default:
- step:
caches:
# This can probably be removed
- node
script: # Modify the commands below to build your repository.
# authenticate with the Azure Container registry
- docker login https://my-repo -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- export IMAGE_NAME=my-repo/my-app:${BITBUCKET_BRANCH}${BITBUCKET_BUILD_NUMBER}
# build the Docker image (this will use the Dockerfile in the root of the repo)
- docker build -t $IMAGE_NAME .
# push the new Docker image to the Docker registry
- docker push $IMAGE_NAME
options:
docker: true



Thanks!

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events