-
Notifications
You must be signed in to change notification settings - Fork 392
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding dockerfile and integration test. (#94)
* Adding dockerfile and integration test. * Update templated_tests/java_gradle/Dockerfile Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com> * Cleaned up Dockerfile. --------- Co-authored-by: codiumai-pr-agent-pro[bot] <151058649+codiumai-pr-agent-pro[bot]@users.noreply.github.com>
- Loading branch information
1 parent
56838d5
commit 94d9996
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Use an image with the required GLIBC version | ||
FROM ubuntu:24.04 as builder | ||
|
||
# Install Java, Python 3.12, and its dev dependencies | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
wget \ | ||
unzip \ | ||
openjdk-11-jdk && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install specific Gradle version | ||
RUN wget https://services.gradle.org/distributions/gradle-7.2-bin.zip -P /tmp && \ | ||
unzip -d /opt/gradle /tmp/gradle-*.zip && \ | ||
ls /opt/gradle/gradle-* && \ | ||
echo "export GRADLE_HOME=/opt/gradle/gradle-7.2" >> /etc/profile.d/gradle.sh && \ | ||
echo "export PATH=\${GRADLE_HOME}/bin:\${PATH}" >> /etc/profile.d/gradle.sh && \ | ||
chmod +x /etc/profile.d/gradle.sh && \ | ||
. /etc/profile.d/gradle.sh | ||
|
||
# Set the environment variable for all subsequent RUN commands | ||
ENV PATH="/opt/gradle/gradle-7.2/bin:${PATH}" | ||
|
||
# Set the working directory | ||
WORKDIR /home/gradle/src | ||
|
||
# Copy the Gradle configuration files into the Docker image | ||
COPY build.gradle settings.gradle gradlew ./ | ||
|
||
RUN chmod +x ./gradlew | ||
|
||
# Copy the source code into the Docker image | ||
COPY src ./src | ||
COPY gradle ./gradle | ||
|
||
# Build the application | ||
RUN gradle build --no-daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters