Skip to content

Commit ca054f1

Browse files
authored
Perform nodejs installation before COPY in Dockerfile templates
1 parent 3403eb7 commit ca054f1

File tree

4 files changed

+12
-20
lines changed

4 files changed

+12
-20
lines changed

templates/Angular2Spa/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
FROM microsoft/dotnet:latest
22

3+
RUN apt-get update
4+
RUN apt-get install -y build-essential nodejs nodejs-legacy
5+
36
COPY . /app
47

58
WORKDIR /app
69

7-
# Add Node.js to the container. If you don't want to wait for this to install every
8-
# time you rebuild your container, consider creating an image that has it preinstalled.
9-
RUN apt-get update
10-
RUN apt-get install -y build-essential nodejs nodejs-legacy
11-
1210
RUN ["dotnet", "restore"]
1311

1412
RUN ["dotnet", "build"]

templates/KnockoutSpa/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
FROM microsoft/dotnet:latest
22

3+
RUN apt-get update
4+
RUN apt-get install -y build-essential nodejs nodejs-legacy
5+
36
COPY . /app
47

58
WORKDIR /app
69

7-
# Add Node.js to the container. If you don't want to wait for this to install every
8-
# time you rebuild your container, consider creating an image that has it preinstalled.
9-
RUN apt-get update
10-
RUN apt-get install -y build-essential nodejs nodejs-legacy
11-
1210
RUN ["dotnet", "restore"]
1311

1412
RUN ["dotnet", "build"]

templates/ReactReduxSpa/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
FROM microsoft/dotnet:latest
22

3+
RUN apt-get update
4+
RUN apt-get install -y build-essential nodejs nodejs-legacy
5+
36
COPY . /app
47

58
WORKDIR /app
69

7-
# Add Node.js to the container. If you don't want to wait for this to install every
8-
# time you rebuild your container, consider creating an image that has it preinstalled.
9-
RUN apt-get update
10-
RUN apt-get install -y build-essential nodejs nodejs-legacy
11-
1210
RUN ["dotnet", "restore"]
1311

1412
RUN ["dotnet", "build"]

templates/ReactSpa/Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
FROM microsoft/dotnet:latest
22

3+
RUN apt-get update
4+
RUN apt-get install -y build-essential nodejs nodejs-legacy
5+
36
COPY . /app
47

58
WORKDIR /app
69

7-
# Add Node.js to the container. If you don't want to wait for this to install every
8-
# time you rebuild your container, consider creating an image that has it preinstalled.
9-
RUN apt-get update
10-
RUN apt-get install -y build-essential nodejs nodejs-legacy
11-
1210
RUN ["dotnet", "restore"]
1311

1412
RUN ["dotnet", "build"]

0 commit comments

Comments
 (0)