Update Dockerfile
This commit is contained in:
parent
4ec8490c55
commit
fc6caecc0b
|
@ -1,10 +1,17 @@
|
|||
FROM alpine:3.8 as builder
|
||||
|
||||
ARG VERSION
|
||||
|
||||
ENV VERSION master
|
||||
#ENV VERSION 0.7.0
|
||||
|
||||
ENV uid 1337
|
||||
ENV gid 1337
|
||||
ENV user lemur
|
||||
ENV group lemur
|
||||
|
||||
#RUN adduser -D -S -u ${uid} ${user} -G ${group}
|
||||
|
||||
RUN addgroup -S ${group} -g ${gid} && adduser -D -S ${user} -G ${group} -u ${uid}
|
||||
|
||||
RUN apk --update add python3
|
||||
|
||||
RUN apk --update add --virtual build-dependencies \
|
||||
|
@ -35,19 +42,29 @@ RUN ls -lha /opt/lemur/
|
|||
|
||||
WORKDIR /opt/lemur
|
||||
|
||||
RUN npm install --unsafe-perm
|
||||
|
||||
RUN pip3 install --upgrade pip
|
||||
|
||||
RUN npm install --unsafe-perm
|
||||
RUN pip3 install setuptools
|
||||
RUN pip3 install -e .
|
||||
|
||||
#RUN node_modules/.bin/gulp build --urlContextPath=/arnold/foo
|
||||
|
||||
RUN node_modules/.bin/gulp build
|
||||
|
||||
#RUN node_modules/.bin/gulp build -h
|
||||
|
||||
RUN node_modules/.bin/gulp package --urlContextPath=$(urlContextPath)
|
||||
|
||||
RUN apk del build-dependencies
|
||||
|
||||
|
||||
#####################
|
||||
|
||||
RUN apk add --update libldap postgresql-client bash nginx supervisor
|
||||
RUN apk add --update libldap postgresql-client bash nginx supervisor curl
|
||||
|
||||
#RUN python3 /opt/lemur/lemur/manage.py reset_password -u lemur
|
||||
|
||||
RUN mkdir -p /run/nginx/
|
||||
|
||||
|
@ -57,10 +74,18 @@ COPY entrypoint /
|
|||
|
||||
RUN chmod +x /entrypoint
|
||||
|
||||
COPY lemur.py /root/.lemur/lemur.conf.py
|
||||
#RUN mkdir -p /conf
|
||||
|
||||
COPY lemur.py /conf/lemur.conf.py
|
||||
|
||||
COPY supervisor.conf /
|
||||
COPY default.conf /etc/nginx/conf.d/
|
||||
|
||||
HEALTHCHECK --interval=12s --timeout=12s --start-period=30s \
|
||||
CMD curl --fail http://localhost:80/api/1/healthcheck |grep -q ok || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint"]
|
||||
|
||||
#CMD ["python3","/lemur/lemur/manage.py","start","-b","0.0.0.0:8000"]
|
||||
|
||||
CMD ["/usr/bin/supervisord","-c","supervisor.conf"]
|
||||
|
|
Loading…
Reference in New Issue