-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-java
27 lines (20 loc) · 1.21 KB
/
Dockerfile-java
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
# Get 'yq' from the source
FROM mikefarah/yq:4.6.1 as yq
#Import the base docker image built on top of Alpine
FROM alpine:3.17.3
ADD ./alpine-mirrors /etc/apk/repositories
COPY --from=yq /usr/bin/yq /usr/bin/yq
WORKDIR /opt/bin
#Add Packages
RUN apk add --no-cache bash sed grep curl coreutils nodejs npm ca-certificates make openssh-client git socat skopeo openssl jq && \
curl -fSL "https://github.com/genuinetools/img/releases/download/v0.5.11/img-linux-amd64" -o "/opt/bin/img" && chmod a+x "/opt/bin/img" && \
apk --no-cache add curl-dev wget openjdk8 maven gradle && apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community && \
wget -O /tmp/openjdk17.tar.gz https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.5%2B8/OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.5_8.tar.gz && \
mkdir -p /usr/lib/jvm/java-17-openjdk && tar --extract --file /tmp/openjdk17.tar.gz --directory /usr/lib/jvm/java-17-openjdk --strip-components 1 --no-same-owner && \
rm /tmp/openjdk17.tar.gz
WORKDIR /cli
ADD ./package.json ./package-lock.json ./.npmrc ./
ADD ./scripts ./scripts
ADD ./commands ./commands
RUN npm install --production
ENTRYPOINT [ "npm", "start" ]