forked from eclipse-sw360/sw360
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (35 loc) · 2.04 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
# Copyright Siemens AG, 2020. Part of the SW360 Portal Project.
#
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
FROM maven:3.6.3-openjdk-11-slim as builder
WORKDIR /app/build/sw360
COPY . .
RUN ./scripts/install-thrift.sh
RUN DEBIAN_FRONTEND=noninteractive apt-get install git -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install wget -y --no-install-recommends
RUN mvn -s /app/build/sw360/scripts/docker-config/mvn-proxy-settings.xml clean package -P deploy -Dtest=org.eclipse.sw360.rest.resourceserver.restdocs.* -DfailIfNoTests=false -Dbase.deploy.dir=. -Dliferay.deploy.dir=/app/build/sw360/deployables/deploy -Dbackend.deploy.dir=/app/build/sw360/deployables/webapps -Drest.deploy.dir=/app/build/sw360/deployables/webapps
RUN ./scripts/docker-config/install_scripts/build_couchdb_lucene.sh
RUN ./scripts/docker-config/install_scripts/download_liferay_and_dependencies.sh
FROM ubuntu:20.04
WORKDIR /app/
USER root
COPY ./scripts/install-thrift.sh .
COPY --from=builder /app/build/sw360/liferay-ce-portal-7.3.4-ga5 /app/liferay-ce-portal-7.3.4-ga5
COPY --from=builder /app/build/sw360/deployables/webapps /app/liferay-ce-portal-7.3.4-ga5/tomcat-9.0.33/webapps
COPY --from=builder /app/build/sw360/deployables/deploy /app/liferay-ce-portal-7.3.4-ga5/deploy
COPY ./scripts/docker-config/portal-ext.properties /app/liferay-ce-portal-7.3.4-ga5
COPY ./scripts/docker-config/etc_sw360 /etc/sw360/
COPY ./scripts/docker-config/install_scripts .
COPY ./scripts/docker-config/setenv.sh /app/liferay-ce-portal-7.3.4-ga5/tomcat-9.0.33/bin
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install tzdata -y --no-install-recommends
RUN ./install-thrift.sh
RUN ./install_init_postgres_script.sh
RUN ./install_configure_couchdb.sh
RUN DEBIAN_FRONTEND=noninteractive apt-get install openjdk-11-jdk -y --no-install-recommends
ENTRYPOINT ./entry_point.sh && bash