forked from Profirator/api-umbrella
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile-build-from-base
36 lines (27 loc) · 1.32 KB
/
Dockerfile-build-from-base
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
ARG BASE_IMAGE=fiware/api-umbrella-base:latest
FROM ${BASE_IMAGE} AS build
FROM ubuntu:18.04
COPY --from=build /app/bin /app/bin
COPY --from=build /app/tasks /app/tasks
COPY --from=build /app/config /app/config
COPY --from=build /app/build /app/build
COPY --from=build /app/docker /app/docker
COPY --from=build /app/src /app/src
COPY --from=build /app/templates /app/templates
WORKDIR /app
RUN /app/tasks/install-system-build-dependencies
RUN groupadd -r api-umbrella && \
useradd -r -g api-umbrella -s /sbin/nologin -d /opt/api-umbrella -c "API Umbrella user" api-umbrella
ENV PATH "/app/bin:/build/build/work/dev-env/sbin:/build/build/work/dev-env/bin:/build/build/work/test-env/sbin:/build/build/work/test-env/bin:/build/build/work/stage/opt/api-umbrella/sbin:/build/build/work/stage/opt/api-umbrella/bin:/build/build/work/stage/opt/api-umbrella/embedded/sbin:/build/build/work/stage/opt/api-umbrella/embedded/bin:${PATH}"
ENV API_UMBRELLA_ROOT /opt/api-umbrella
ENV API_UMBRELLA_SRC_ROOT /app
RUN mkdir -p /etc/api-umbrella
RUN mkdir /opt/api-umbrella
RUN mkdir /opt/api-umbrella/etc
RUN mkdir /opt/api-umbrella/var
RUN mkdir /opt/api-umbrella/var/log
RUN mkdir /opt/api-umbrella/var/run
RUN mkdir /opt/api-umbrella/var/tmp
RUN mkdir /opt/api-umbrella/var/db
RUN chmod -R a+rwx /opt
ENTRYPOINT ["/app/docker/dev/docker-start-command"]