Skip to content

Commit b25e2ac

Browse files
tooryxcopybara-github
authored andcommitted
Dockerize the callback server.
PiperOrigin-RevId: 775648064 Change-Id: Ia82c30cd8fd6346972798b947b9524ce79c74ff8
1 parent bc7010b commit b25e2ac

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Stage 1: Build phase
2+
3+
FROM ubuntu:latest AS build
4+
5+
## Dependencies
6+
7+
RUN apt-get update \
8+
&& apt-get install -y --no-install-recommends openjdk-21-jdk \
9+
&& rm -rf /var/lib/apt/lists/* \
10+
&& rm -rf /usr/share/doc && rm -rf /usr/share/man \
11+
&& apt-get clean
12+
13+
# Compile the callback server
14+
15+
WORKDIR /usr/repos/tsunami-security-scanner-callback-server
16+
COPY . .
17+
RUN ./gradlew shadowJar
18+
RUN mkdir /usr/tsunami
19+
RUN find . -name 'tcs-main-*.jar' -exec cp {} /usr/tsunami/tsunami-tcs.jar \; \
20+
&& cp tcs_config.yaml /usr/tsunami/tcs_config.yaml
21+
22+
## Stage 2: Release
23+
24+
FROM scratch AS release
25+
26+
# Copy previous build results
27+
COPY --from=build /usr/tsunami/tsunami-tcs.jar /usr/tsunami/
28+
COPY --from=build /usr/tsunami/tcs_config.yaml /usr/tsunami/

0 commit comments

Comments
 (0)