Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Install NodeJS on the microsoft/dotnet:sdk docker image


In my ASP.NET Core, I am using Gulp to convert Sass to CSS and minify files ...etc.

In the build step, I need NodeJS present so that Gulp tasks can run.

How do I install NodeJS onto the ASP.NET Core image: microsoft/dotnet:sdk

Thank you.

1 answer

0 votes
devpartisan Atlassian Team Feb 12, 2019


One way answers your question precisely, but I don't recommend it. The official dockerfile indicates the image uses Debian (I happen to know the code word "stretch" means Debian). That means we can install Node using the Debian package manager:

curl -sL | bash -
apt-get install -y nodejs

What I would recommend instead is using 2 different images. Do the Gulp tasks in 1 Pipeline step using a Node image, pass the resulting files as "artifacts", and then perform the .NET work. That might look something like this (don't read too much into the directory structures, change to fit your case):

    - step:
        name: Gulp the JavaScript
        image: node:11.9.0
          - node
          - npm install
          - gulp
        artifacts: # defining the artifacts to be passed to each future step.
          - dist/**
          - reports/*.txt
    - step:
        name: Dotnet the Csharp
        image: microsoft/dotnet:2.2-sdk
          # using one of the artifacts from the previous step
          - cat reports/tests.txt
          - dotnet build someproject.sln

Note both images are pinned to a version. Major version numbers are breaking changes, so don't undermine the reliability of your build by pointing to "latest". I find minor and bugfix numbers also useful to pin because they can cause more subtle build problems. When you want to bump the version, put it on a branch, make the change, then merge only when you know it works.

Hope that helps.

Is this answer still valid?  I have a configured a similar pipeline but the artifacts from the first node step are not available in the second step which uses dotnet image.  Do the images between the steps have to be the same for this to work?

I have also tried the $BITBUCKET_PIPE_STORAGE_DIR and $BITBUCKET_PIPE_SHARED_STORAGE_DIR but those don't seem to work either.  They both point to /root when I cd to their locations.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

250 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you