-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile_builder
More file actions
31 lines (25 loc) · 1.05 KB
/
Dockerfile_builder
File metadata and controls
31 lines (25 loc) · 1.05 KB
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
# Use this to cache project dependencies for easy building
FROM lkjaero/foreign-language-reader-api:base
# Needed because sbt will barf if we don't have one
# Even though we aren't actually accessing the maven package repository
ENV GITHUB_TOKEN faketoken
ENV SBT_VERSION 1.3.9
ENV INSTALL_DIR /usr/local
ENV SBT_HOME /usr/local/sbt
ENV PATH ${PATH}:${SBT_HOME}/bin
WORKDIR /app
# Keep failing pipe command from reporting success to the build.
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
# Install sbt
RUN apk add --no-cache wget=1.21.1-r1 && \
mkdir -p "$SBT_HOME" && \
wget -qO - --no-check-certificate "https://github.com/sbt/sbt/releases/download/v$SBT_VERSION/sbt-$SBT_VERSION.tgz" | tar xz -C $INSTALL_DIR && \
echo "- with sbt $SBT_VERSION" >> /root/.built && \
apk del wget # wget just exists to install sbt
# Cache dependencies
# The build.sbt is a stub sbt build file that just has dependencies but no code.
COPY project project
COPY build-dependencies build.sbt
COPY coursier_cache /root/.cache/coursier/v1/
RUN sbt compile && \
rm build.sbt