Skip to content

Commit 61dbd59

Browse files
Hamid shahidMarkPieszak
authored andcommitted
feat(docker): add initial docker file as example
1 parent 1bd2e0e commit 61dbd59

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

content/Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Stage 1 - Restoring & Compiling
2+
FROM microsoft/dotnet:2.1-sdk-alpine3.7 as builder
3+
WORKDIR /source
4+
RUN apk add --update nodejs nodejs-npm
5+
COPY *.csproj .
6+
RUN dotnet restore
7+
COPY package.json .
8+
RUN npm install
9+
COPY . .
10+
RUN dotnet publish -c Release -o /app/
11+
12+
# Stage 2 - Creating Image for compiled app
13+
FROM microsoft/dotnet:2.1.1-aspnetcore-runtime-alpine3.7 as baseimage
14+
RUN apk add --update nodejs nodejs-npm
15+
WORKDIR /app
16+
COPY --from=builder /app .
17+
ENV ASPNETCORE_URLS=http://+:$port
18+
19+
# Run the application. REPLACE the name of dll with the name of the dll produced by your application
20+
EXPOSE $port
21+
CMD ["dotnet", "vue2spa.dll"]

0 commit comments

Comments
 (0)