forked from corretto/amazon-corretto-crypto-provider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
52 lines (42 loc) · 1.48 KB
/
Dockerfile.dev
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
# Build and run with:
#
# $ docker build -t accp -f Dockerfile.dev .
# $ docker run -v $(pwd):/accp --rm -it accp:latest
#
# Once in the container's shell, quickly iterate on rebuilding AWS-LC and ACCP
# to re-run a single test with:
#
# $ SINGLE_TEST=com.amazon.corretto.crypto.provider.test.EvpSignatureTest
# $ ./gradlew minimal_clean && ./gradlew single_test -DSINGLE_TEST=${SINGLE_TEST}
FROM public.ecr.aws/ubuntu/ubuntu:20.04_stable
# install corretto JDK
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y curl \
gnupg
RUN curl -s https://apt.corretto.aws/corretto.key | apt-key add - \
&& echo 'deb https://apt.corretto.aws stable main' | tee /etc/apt/sources.list.d/corretto.list
RUN apt-get update \
&& apt-get install -y java-11-amazon-corretto-jdk
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto/
RUN echo 'export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto/' >> /home/.bashrc
# required dependencies for building/testing
RUN apt-get install -y build-essential \
cmake \
lcov \
python3-pip
RUN pip3 install gcovr
# developement niceties
RUN apt-get install -y ninja-build \
git
# required for FIPS
RUN apt-get install -y golang-1.18 \
perl
RUN ln -s /usr/lib/go-1.18/bin/go /usr/bin/go \
&& ln -s /usr/lib/go-1.18/bin/gofmt /usr/bin/gofmt
RUN mkdir /accp
COPY . /accp
WORKDIR /accp
# run the gradlew script just to install gradle in the image
RUN ./gradlew --no-daemon generateEclipseClasspath
ENTRYPOINT /bin/bash