-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerFileConductorServer
62 lines (42 loc) · 1.94 KB
/
DockerFileConductorServer
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
60
# Replace this version when you want to upgrade or build with a specific version
# You can replace this image to your container repository location. Please push the required image into your container repository before running the build.
ARG CONDUCTOR_VERSION
FROM orkesio/orkes-conductor-server:$CONDUCTOR_VERSION AS builder
# Replace this OSS base image with you own custom base OSS image as required, everything else should remain the same
FROM alpine:3.16.2
MAINTAINER Orkes Inc <[email protected]>
RUN apk add nginx
RUN nginx -version
RUN apk add openjdk11
RUN java --version
RUN apk add coreutils
# Update certs -sometimes M1 macs have issues without it
RUN update-ca-certificates -f
RUN addgroup -S conductor && adduser -S conductor -G conductor
# Copy compiled UI assets to nginx www directory
WORKDIR /usr/share/nginx/html
RUN rm -rf ./*
COPY --from=builder /usr/share/nginx/html /usr/share/nginx/html
COPY --from=builder /etc/nginx/http.d/default.conf /etc/nginx/http.d/default.conf
# Startup script(s)
COPY --from=builder /app/startup.sh /app/startup.sh
COPY --from=builder /app/config/config.properties /app/config/config.properties
# JAR files
COPY --from=builder /app/libs/server.jar /app/libs/server.jar
RUN chmod +x /app/startup.sh
HEALTHCHECK --interval=60s --timeout=30s --retries=10 CMD curl -I -XGET http://localhost:8080/health || exit 1
EXPOSE 5000 8080 9090
# Make app folders
RUN mkdir -p /app/config /app/logs /app/libs
RUN chown -R conductor:conductor /app
RUN touch /var/run/nginx.pid && chown -R conductor:conductor /var/run/nginx.pid
RUN touch /var/cache/nginx && chown -R conductor:conductor /var/cache/nginx
RUN chown -R conductor:conductor /var/log/nginx
RUN chown -R conductor:conductor /var/lib/nginx
RUN chown -R conductor:conductor /run/nginx
RUN chown -R conductor:conductor /etc/nginx/http.d/default.conf
RUN chown -R conductor:conductor /usr/share/nginx/html
WORKDIR /app
USER conductor
CMD ["/app/startup.sh"]
ENTRYPOINT ["/bin/sh"]