You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
First of all, I'm brand new to Docker! I am currently trying to create my own docker image which I can use in my bitbucket pipelines. What I am trying to do is install node and ruby on the same container. Here is what my current `Dockerfile` looks like:
I've built, tagged and pushed this image and use it in my `bitbucket-pipelines.yml` and I'm trying to run this step script:
- yarn install
When this is run in the pipeline I get this error:
bash: yarn: command not found
I've tried a couple of things, I removed the `FROM ruby:2.7.5` and the yarn command worked but obviously the `gem install bundler...` did not. So, I know that the Dockerfile and image are working but I don't know how to use both images in my own Dockerfile. Does anyone know what I'm doing wrong?
Hi @Rick Henry
Thank you for contacting Atlassian Support, I'm Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!
I would like to inform you that in case you use multiple FROM in a Dockerfile, you can create a "multi-stage build", which generates two seperate Docker images. You can read further about this on the following site: https://docs.docker.com/develop/develop-images/multistage-build/
As a workaround, what I would like to suggest you is to use a similar Docker image in your build like this: https://hub.docker.com/r/timbru31/ruby-node
timbru31 has already created a Docker image, which contains both Ruby and Node.
Please let me know if this helps.
Have a great day!
Atlassian Bitbucket Cloud Support