-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
63 lines (47 loc) · 1.75 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
60
61
62
63
# Default release is 20.04
ARG BASE_IMAGE_RELEASE=jammy
# Default base image
ARG BASE_IMAGE=openresty/openresty
FROM abcdesktopio/oc.nginx:builder as builder
# default branch
ARG BRANCH=3.2
# convert ARG to ENV with same name
ENV BRANCH=$BRANCH
# copy .git for version
COPY .git /.git
# copy data files
# COPY var/webModules /var/webModules
RUN echo clone branch ${BRANCH}
RUN cd /var && git clone -b $BRANCH https://github.com/abcdesktopio/webModules.git
#
# run makefile step by step
# to get troubleshooting data
#
RUN cd /var/webModules && make install
RUN cd /var/webModules && make updatejs
RUN cd /var/webModules && make dev
RUN cd /var/webModules && ./mkversion.sh
# RUN cd /var/webModules && make untranspile
# RUN cd /var/webModules/transpile && npm audit fix
# RUN cd /var/webModules && npm i --package-lock-only && npm audit fix
# --- START Build image ---
FROM $BASE_IMAGE:$BASE_IMAGE_RELEASE
# FROM openresty/openresty:jammy
RUN /usr/local/openresty/luajit/bin/luarocks install lua-resty-jwt && \
/usr/local/openresty/luajit/bin/luarocks install lua-resty-string && \
/usr/local/openresty/luajit/bin/luarocks install lua-cjson && \
/usr/local/openresty/luajit/bin/luarocks install lua-resty-rsa
RUN mkdir -p /var/nginx/cache /var/nginx/tmp /config /var/log/nginx /etc/nginx/logs/
# COPY generated html file web site from builder container
# copy all files
RUN mkdir -p /var/webModules
COPY --from=builder var/webModules /var/webModules
# copy all nginx configuration files
COPY etc/nginx /etc/nginx
# copy default abcdesktop docker-entrypoint.sh
COPY composer /composer
# copy default keys
COPY config.payload.default/ /config.payload.default
COPY config.signing.default/ /config.signing.default
EXPOSE 80 443
CMD ["/composer/docker-entrypoint.sh"]