forked from SolRacht/WritingComDownloader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (27 loc) · 1.06 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
FROM openjdk:16-jdk-alpine3.12
ENV SCALA_VERSION=2.13.4 \
SCALA_HOME=/usr/share/scala \
SBT_VERSION=1.4.5 \
PATH="/usr/local/sbt/bin/:$PATH"
# Download SBT
RUN apk add --no-cache --virtual=.build-dependencies wget ca-certificates && \
apk add --no-cache bash && \
cd "/tmp" && \
wget --no-verbose "https://downloads.typesafe.com/scala/${SCALA_VERSION}/scala-${SCALA_VERSION}.tgz" && \
tar xzf "scala-${SCALA_VERSION}.tgz" && \
mkdir "${SCALA_HOME}" && \
rm "/tmp/scala-${SCALA_VERSION}/bin/"*.bat && \
mv "/tmp/scala-${SCALA_VERSION}/bin" "/tmp/scala-${SCALA_VERSION}/lib" "${SCALA_HOME}" && \
ln -s "${SCALA_HOME}/bin/"* "/usr/bin/" && \
apk del .build-dependencies && \
rm -rf "/tmp/"* && \
mkdir -p "/usr/local/" && \
wget "https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.tgz" && \
tar xzf "sbt-${SBT_VERSION}.tgz" -C "/usr/local/" && \
sbt -version
# Create app
WORKDIR /app
COPY . .
RUN sbt assembly && \
chmod +x /app/target/scala-2.13/scraper.jar && \
rm -rf ~/.ivy2/