Skip to content

Commit 70d84c5

Browse files
committed
Dockerized!
1 parent 7286948 commit 70d84c5

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
2+
3+
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | sh -
4+
RUN apt-get update && apt-get install -y nodejs
5+
6+
WORKDIR /app
7+
COPY . ./
8+
RUN npm ci
9+
WORKDIR /app/example
10+
RUN npm ci
11+
RUN npx webpack-cli --mode production
12+
13+
FROM nginx:1.22.0
14+
COPY --from=build /app/example/dist /usr/share/nginx/html

docker-compose.yml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: "3"
2+
3+
services:
4+
server:
5+
build: .
6+
ports:
7+
- 80:80

example/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width" />
66
<title>Browser C# Example</title>
7+
<base href="/browser-csharp/"/>
78
<style>
89
* {
910
box-sizing: border-box;

example/webpack.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = {
3030
new HtmlPlugin({
3131
template: path.resolve(__dirname, "index.html"),
3232
title: "Browser C# Example",
33-
base: "/"
33+
base: "/browser-csharp/"
3434
})
3535
],
3636
output: {
@@ -41,4 +41,4 @@ module.exports = {
4141
contentBase: path.resolve(__dirname, "dist"),
4242
port: 9090
4343
}
44-
};
44+
};

0 commit comments

Comments
 (0)