-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (27 loc) · 1.21 KB
/
Dockerfile
File metadata and controls
41 lines (27 loc) · 1.21 KB
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
####################################################################
####################################################################
FROM alpine:3.8 AS base
LABEL maintainer="Nate Strandberg <nater540@gmail.com>"
# Destination directory for the application
ENV INSTALL_PATH /app/current
# Destination directory for nginx unit
ENV DESTDIR /opt/unit/
WORKDIR ${INSTALL_PATH}
RUN apk --no-cache add bash
COPY ./scripts /scripts
RUN /scripts/base_packages.sh && \
/scripts/install_ruby.sh
####################################################################
####################################################################
FROM base AS nginx-unit
RUN /scripts/build_unit.sh
# ####################################################################
# ####################################################################
FROM base AS final-destination
COPY --from=nginx-unit ${DESTDIR} ${DESTDIR}
ADD ./examples .
RUN ln -sf /dev/stdout /var/log/unitd.log
COPY ./conf.json /opt/unit/state
# RUN apk --no-cache add tree
ENTRYPOINT ["/usr/local/bin/dumb-init", "--rewrite", "15:3", "--"]
CMD ["/opt/unit/sbin/unitd", "--no-daemon", "--control", "0.0.0.0:8080", "--modules", "/opt/unit/modules", "--state", "/opt/unit/state"]