File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Use nginx as the base image
2
+ FROM nginx:alpine
3
+
4
+ # Install git
5
+ RUN apk add --no-cache git
6
+
7
+ # Create a directory for the documentation
8
+ WORKDIR /usr/share/nginx/html
9
+
10
+ # Clone the repository and checkout gh-pages branch
11
+ RUN git clone https://github.com/immerjs/immer.git /tmp/immer && \
12
+ cd /tmp/immer && \
13
+ git checkout gh-pages && \
14
+ cp -r ./* ./.??* /usr/share/nginx/html/ && \
15
+ rm -rf /tmp/immer
16
+
17
+ # Create custom nginx configuration
18
+ RUN echo 'server { \
19
+ listen 80; \
20
+ server_name localhost; \
21
+ root /usr/share/nginx/html; \
22
+ index index.html; \
23
+ location / { \
24
+ try_files $uri $uri/ /index.html; \
25
+ } \
26
+ location /immer/ { \
27
+ alias /usr/share/nginx/html/; \
28
+ try_files $uri $uri/ /index.html; \
29
+ } \
30
+ }' > /etc/nginx/conf.d/default.conf
31
+
32
+ # Expose port 80
33
+ EXPOSE 80
34
+
35
+ # Start Nginx
36
+ CMD ["nginx" , "-g" , "daemon off;" ]
You can’t perform that action at this time.
0 commit comments