-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile.dev
44 lines (32 loc) · 1.28 KB
/
Dockerfile.dev
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
FROM node:18 as build
LABEL maintainer="rzrbld <[email protected]>"
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
RUN mkdir /app/adminio-ui
ADD . /app/adminio-ui/
RUN rm -rf adminio-ui/dist/*
RUN rm -rf adminio-ui/node_modules/*
RUN cd adminio-ui && ls -al && \
npm cache clean --force && npm install -g npm --force && npm install -g @angular/cli --force && npm install --force
RUN cd /app/adminio-ui && npm run build
FROM nginx:1.23-alpine
ENV API_BASE_URL http://localhost:8080
ENV ADMINIO_PROD false
ENV ADMINIO_MULTI_BACKEND true
ENV ADMINIO_BACKENDS '[{"name":"myminio","url":"http://localhost:8080"},{"name":"local","url":"http://localhost:8081"},{"name":"not-myminio","url":"http://minio.example.com:8080"}]'
ENV NGX_ROOT_PATH /
ENV NGX_PORT 80
COPY docker-entrypoint.sh /app/
RUN chmod +x /app/docker-entrypoint.sh
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
COPY nginx/default.template /etc/nginx/conf.d/default.template
COPY --from=build /app/adminio-ui/dist /usr/share/nginx/html
# fix run in unprivileged mode (k8s/openshift)
RUN chmod -R 777 /usr/share/nginx/html
RUN chmod -R 777 /etc/nginx/conf.d
RUN chmod -R 777 /var/cache/nginx
RUN chmod -R 777 /var/run
# end of fix
EXPOSE 80
ENTRYPOINT ["/app/docker-entrypoint.sh"]
CMD [ "nginx", "-g", "daemon off;" ]