-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
47 lines (32 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Use Ruby as a base
FROM ruby:latest AS build
# Install necessary packages
RUN apt-get update && apt-get install -y \
nodejs \
npm \
openjdk-17-jdk openjdk-17-jre \
curl \
openssl \
jq
# Install Sushi tool
RUN npm install -g fsh-sushi http-server
# Install Jekyll
RUN gem install bundler jekyll
# Set the working directory
WORKDIR /home/src
# Copy the contents of the current directory to /home/src in the container
COPY . .
# Make sure all files have appropriate permissions
RUN chmod 777 -R .
RUN mkdir -p /home/src/input-cache/ >/dev/null 2>&1
# Make sure the scripts are executable
RUN chmod +x /home/src/_gencontinuous.sh /home/src/_genonce.sh /home/src/_updatePublisher.sh
RUN /home/src/_updatePublisher.sh -y
RUN java -Xmx4g -jar /home/src/input-cache/publisher.jar publisher -ig .
FROM nginx:alpine
# Copy the generated output from the build stage to the Nginx document root
COPY --from=build /home/src/output /usr/share/nginx/html
# Expose the port
EXPOSE 80
# Start Nginx
CMD ["nginx", "-g", "daemon off;"]