forked from ome/devspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (29 loc) · 1.05 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
FROM openmicroscopy/devagent:0.8.1
MAINTAINER OME
COPY nginx-stable.repo /etc/yum.repos.d/
RUN dnf -y install dnf-utils
RUN yum-config-manager --enable nginx-stable
RUN dnf -y install nginx\
&& dnf clean all
# comment out default server config in nginx.conf
RUN sed -i "/^\s\s\s\sserver/, /^\s\s\s\s}/ s|^|#|" /etc/nginx/nginx.conf
VOLUME ["/etc/nginx/conf.d", "/var/log/nginx"]
WORKDIR /etc/nginx
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
EXPOSE 80 443
ADD ./run.sh /tmp/run.sh
RUN chown omero:omero /tmp/run.sh
RUN chmod a+x /tmp/run.sh
# workaround to avoid 403 on static files
RUN chmod a+x /home/omero
# Change user id to fix permissions issues
ARG USER_ID=1000
RUN usermod -u $USER_ID omero
# make sure mounted volumes has correct permissions
RUN mkdir -p /home/omero/static
RUN chown -R omero:omero /home/omero/static
VOLUME ["/etc/nginx/conf.d", "/home/omero/static", "/var/log/nginx", "/etc/nginx/ssl"]
USER omero
CMD ["/tmp/run.sh"]