-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
52 lines (36 loc) · 1.98 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
FROM alpine:3.17
ARG version=17.0.9.8.1
# Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently.
# The Corretto team will update this file but you may see a few days' delay.
#
# Slim:
# JLink is used (retaining all modules) to create a slimmer version of the JDK excluding man-pages, header files and debugging symbols - saving ~113MB.
RUN wget -O /THIRD-PARTY-LICENSES-20200824.tar.gz https://corretto.aws/downloads/resources/licenses/alpine/THIRD-PARTY-LICENSES-20200824.tar.gz && \
echo "82f3e50e71b2aee21321b2b33de372feed5befad6ef2196ddec92311bc09becb /THIRD-PARTY-LICENSES-20200824.tar.gz" | sha256sum -c - && \
tar x -ovzf THIRD-PARTY-LICENSES-20200824.tar.gz && \
rm -rf THIRD-PARTY-LICENSES-20200824.tar.gz && \
wget -O /etc/apk/keys/amazoncorretto.rsa.pub https://apk.corretto.aws/amazoncorretto.rsa.pub && \
SHA_SUM="6cfdf08be09f32ca298e2d5bd4a359ee2b275765c09b56d514624bf831eafb91" && \
echo "${SHA_SUM} /etc/apk/keys/amazoncorretto.rsa.pub" | sha256sum -c - && \
echo "https://apk.corretto.aws" >> /etc/apk/repositories && \
apk add --no-cache amazon-corretto-17=$version-r0 binutils && \
/usr/lib/jvm/default-jvm/bin/jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim && \
apk del binutils amazon-corretto-17 && \
mkdir -p /usr/lib/jvm/ && \
mv /opt/corretto-slim /usr/lib/jvm/java-17-amazon-corretto && \
ln -sfn /usr/lib/jvm/java-17-amazon-corretto /usr/lib/jvm/default-jvm
ENV LANG C.UTF-8
ENV JAVA_HOME=/usr/lib/jvm/default-jvm
ENV PATH=$PATH:/usr/lib/jvm/default-jvm/bin
RUN apk add --update nodejs npm
WORKDIR /app
COPY ./package.json /app/
COPY ./build/dist /app/dist
COPY ./vite.config.js /app/dist
COPY ./postcss.config.js /app/dist
COPY ./tailwind.config.js /app/dist
COPY ./build/target /app/target
RUN npm install
EXPOSE 8080
EXPOSE 3030
CMD npm run start:both-prod