You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi All,
Thanks for creating such a wonderful tool for automations.
Am currently working on a project where I need to create Docker task to build and push the image to a nexus repo.
Here is my sample docker file (Specify the Dockerfile contents in the tasks)
# Base
FROM openjdk:8-jdk-alpine
# Add App
RUN mkdir -p /app/config
EXPOSE 8080/tcp
EXPOSE 10389/tcp
The above works perfectly fine.
Now I wanted to push some values into this docker file to make it more generic.
So I defined under variable of that same bamboo tasks a key value pair given below.
key=BASEIMAGE
value=openjdk:8-jdk-alpine
and changed my dockerfile to below: (Specify the Dockerfile contents i nthe tasks):
# Base
FROM ${bamboo.BASEIMAGE}
# Add App
RUN mkdir -p /app/config
EXPOSE 8080/tcp
EXPOSE 10389/tcp
The above works perfectly fine too and swap the ${bamboo.BASEIMAGE} to "openjdk:8-jdk-alpine"
The issue appears when I save the same Dockerfile to a git repo and try to use the option "Use an existing Dockerfile located in the task's working directory" to pull the dockerfile while creating the docker build image from th erepo.
The same dockerfile throws error.
Error:
Sending build context to Docker daemon 23.06MB build 11-Feb-2020 13:06:31 build 11-Feb-2020 13:06:31 Step 1/4 : FROM ${bamboo.BASEIMAGE} error 11-Feb-2020 13:06:31 failed to process "${bamboo.BASEIMAGE}": missing ':' in substitution
I am not sure why it is throwing error. As the dockerfile is not changed at all or is there a different way to get the env variables into Dockerfile using repo
I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events