forked from sysprog21/ca2023-lab3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (23 loc) · 846 Bytes
/
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
FROM ubuntu:22.04
# zip and unzip are required for the sdkman to be installed from script
RUN \
apt update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
build-essential \
verilator \
curl \
zip \
unzip \
&& \
rm -rf /var/lib/apt/lists/*
# reference: https://sdkman.io/install
RUN curl -s "https://get.sdkman.io" | bash
# this SHELL command is needed to allow `source` to work properly
# reference: https://stackoverflow.com/questions/20635472/using-the-run-instruction-in-a-dockerfile-with-source-does-not-work/45087082#45087082
SHELL ["/bin/bash", "-c"]
RUN source "$HOME/.sdkman/bin/sdkman-init.sh" && \
sdk install java $(sdk list java | grep -o "\b8\.[0-9]*\.[0-9]*\-tem" | head -1) && \
sdk install sbt
WORKDIR "/root"
COPY . .
ENTRYPOINT ["/bin/bash"]