forked from NREL/api-umbrella
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-dev-build
61 lines (46 loc) · 2.29 KB
/
Dockerfile-dev-build
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM ubuntu:16.04 AS build
RUN mkdir -p /app/build /build/.task /build/build/work
RUN ln -snf /build/.task /app/.task
RUN ln -snf /build/build/work /app/build/work
WORKDIR /app
ENV DOCKER_DEV true
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1
COPY tasks/install-system-build-dependencies /app/tasks/install-system-build-dependencies
COPY build/package_dependencies.sh /app/build/package_dependencies.sh
COPY tasks/helpers.sh /app/tasks/helpers.sh
RUN env INSTALL_TEST_DEPENDENCIES=true /app/tasks/install-system-build-dependencies
COPY Makefile.in /app/Makefile.in
COPY Taskfile.yml /app/Taskfile.yml
COPY configure /app/configure
COPY tasks/bootstrap-* /app/tasks/
RUN ./configure
COPY build/patches /app/build/patches
COPY tasks/deps /app/tasks/deps
COPY tasks/clean/dev /app/tasks/clean/dev
RUN make deps && make clean:dev
COPY tasks/build-deps /app/tasks/build-deps
RUN make build-deps && make clean:dev
COPY Gemfile /app/Gemfile
COPY Gemfile.lock /app/Gemfile.lock
COPY tasks/test-deps /app/tasks/test-deps
RUN make test-deps && make clean:dev
COPY src/api-umbrella/admin-ui/package.json /app/src/api-umbrella/admin-ui/package.json
COPY src/api-umbrella/admin-ui/yarn.lock /app/src/api-umbrella/admin-ui/yarn.lock
COPY src/api-umbrella/web-app/Gemfile /app/src/api-umbrella/web-app/Gemfile
COPY src/api-umbrella/web-app/Gemfile.lock /app/src/api-umbrella/web-app/Gemfile.lock
COPY tasks/app-deps /app/tasks/app-deps
RUN make app-deps && make clean:dev
COPY . /app
RUN make && make clean:dev
RUN rm -rf build/work/tasks
FROM ubuntu:16.04
COPY --from=build /app /app
COPY --from=build /build /build
WORKDIR /app
RUN env INSTALL_TEST_DEPENDENCIES=true /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 /build/build/work/stage/opt/api-umbrella
ENTRYPOINT ["/app/docker/dev/docker-entrypoint"]
CMD ["/app/docker/dev/docker-start"]