forked from fosslight/fosslight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (22 loc) · 917 Bytes
/
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
# Copyright (c) Sameer1046
# SPDX-License-Identifier: AGPL-3.0-only
# Build the image from source
FROM gradle:6.8.2-jdk11 AS build
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle build --no-daemon --exclude-task test
# Create the containerized app
FROM adoptopenjdk/openjdk11:jre-11.0.15_10-ubuntu
LABEL maintainer="FOSSLight <fosslight-dev@lge.com>"
COPY --from=build /home/gradle/src/build/libs/*.war /app/FOSSLight.war
COPY ./verify/verify /app/verify/verify
COPY ./db/wait-for /app/wait-for
COPY ./LICENSES /app/LICENSES
ADD ./src/main/resources/template /app/template
RUN chmod +x /app/wait-for /app/verify/verify \
&& apt-get update \
&& apt-get install -y --no-install-recommends netcat \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /bin/sh bash
WORKDIR /app
CMD ["java" , "-jar", "FOSSLight.war", "--root.dir=/data/fosslight", "--server.port=8180"]