-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
59 lines (48 loc) · 1.56 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
48
49
50
51
52
53
54
55
56
57
58
59
# Use Fedora image created at ???
FROM fedora@sha256:4e007f288dce23966216be81ef62ba05d139b9338f327c1d1c73b7167dd47312
# Update the system and install Nginx
RUN dnf -y update && \
dnf -y install nginx \
java-11-openjdk-devel \
nc \
dos2unix
# Install Node.js v20.9.0
RUN curl -sL https://rpm.nodesource.com/setup_20.x | bash - && \
dnf -y install nodejs
RUN npm install -g newman
# Copy the static HTML files from your host to the container
COPY static /usr/share/nginx/html
# Add the Nginx configuration file
COPY nginx.conf /etc/nginx/nginx.conf
# Copy the log script and the entrypoint script
COPY *.sh /
# Copy the Wiremock files
COPY wiremock/wiremock-standalone-3.5.4.jar /var/wiremock/lib/wiremock-standalone.jar
COPY wiremock/__files /home/wiremock/__files
COPY wiremock/mappings /home/wiremock/mappings
COPY wiremock/wiremock.sh /home/wiremock/wiremock.sh
# Copy newman
COPY newman /home/newman
RUN cd /home/newman && npm install
# Copy newman-ui
COPY newman-ui /home/newman-ui
RUN cd /home/newman-ui && npm install && npm run build && cp -r dist /usr/share/nginx/html/newman-ui
# Make the scripts executable
RUN chmod +x \
/log-script.sh \
/entrypoint.sh \
/wait-for.sh \
/wiremock.sh \
/home/wiremock/wiremock.sh \
/home/newman/newman-endpoint.sh
RUN dos2unix \
/log-script.sh \
/entrypoint.sh \
/wait-for.sh \
/wiremock.sh \
/home/wiremock/wiremock.sh \
/home/newman/newman-endpoint.sh
# Expose port 80
EXPOSE 80 3000 4000
# Start the entrypoint script when the container launches
ENTRYPOINT ["/entrypoint.sh"]