forked from aws/porting-advisor-for-graviton
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (16 loc) · 764 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (16 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 as builder
RUN yum install java-17-amazon-corretto python3.11 python3.11-pip maven binutils -y && \
yum clean all
ENV JAVA_HOME=/usr/lib/jvm/java
ENV MAVEN_HOME=/usr/share/maven
COPY src src/
COPY build.sh setup-environment.sh getBinaryName.sh requirements-build.txt ./
RUN /usr/bin/python3.11 -m venv .venv && \
source .venv/bin/activate && \
python3 -m pip install -r requirements-build.txt && \
FILE_NAME=porting-advisor ./build.sh
RUN mv dist/porting-advisor /opt/porting-advisor
# Use Amazon Corretto as runtime
FROM public.ecr.aws/amazoncorretto/amazoncorretto:17-al2023 as runtime
COPY --from=builder /opt/porting-advisor /usr/bin/porting-advisor
ENTRYPOINT ["/usr/bin/porting-advisor"]