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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Dockerfile throws error for env variable

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.




and changed my dockerfile to below: (Specify the Dockerfile contents i nthe tasks):

# Base
# 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.



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

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events