-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (33 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
40 lines (33 loc) · 1.27 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
FROM debian:bookworm
MAINTAINER Leif Johansson <leifj@sunet.se>
# Create a non-root user for nginx
RUN groupadd -r nginx && useradd -r -g nginx -s /bin/false -M nginx
RUN apt-get update -q && apt-get install -yy nginx openssl nginx-extras gettext-base
COPY dist-pre /dist
ADD docker/start.sh /
RUN chmod a+rx /start.sh
ADD scripts/subst-vars.sh /
RUN chmod a+rx /subst-vars.sh
# Create necessary directories and set ownership
RUN mkdir -p /var/log/nginx /var/lib/nginx /var/cache/nginx /run/nginx /tmp/nginx && \
chown -R nginx:nginx /var/log/nginx /var/lib/nginx /var/cache/nginx /run/nginx /tmp/nginx && \
chmod -R 755 /var/log/nginx /var/lib/nginx /var/cache/nginx /run/nginx /tmp/nginx && \
chmod -R 644 /dist && \
find /dist -type d -exec chmod 755 {} \;
ENV BASE_URL "http://localhost/"
ENV COMPONENT_URL "http://localhost/cta/"
ENV PERSISTENCE_URL "http://localhost/ps/"
ENV MDQ_URL "http://localhost:8000/entities/"
ENV SEARCH_URL "http://localhost:8000/api/search"
ENV MDQ_HOSTPORT "localhost:8000"
ENV STORAGE_DOMAIN "localhost"
ENV LOGLEVEL "warn"
ENV DEFAULT_CONTEXT "local"
ENV MIN_SEARCH_LENGTH "3"
ARG VERSION=1.0.0
ENV VERSION=$VERSION
ARG PREV_VERSION=1.0.0
ENV PREV_VERSION=$PREV_VERSION
ARG PRE_RELEASE=false
ENV PRE_RELEASE=$PRE_RELEASE
ENTRYPOINT ["/start.sh"]