Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sp 3544 #65

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Sp 3544 #65

merged 4 commits into from
Jun 13, 2024

Conversation

at88mph
Copy link
Member

@at88mph at88mph commented Jun 13, 2024

No description provided.

@@ -0,0 +1,16 @@
ARG JAVA_VERSION=11

FROM gradle:7-jdk${JAVA_VERSION} as builder
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the FROM directive, some Docker build kits (e.g. Ubuntu 22.04) require ARG JAVA_VERSION, with no value set, to build the Docker image correctly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, thanks. If one requires the JAVA_VERSION environment variable inside the build, then this is necessary. I just need it to identify the image to use.

&& rsync -arvc node-v18.18.0-linux-x64/* /usr/local/

FROM gradle:7-jdk${JAVA_VERSION}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above: ARG JAVA_VERSION after the FROM directive.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood, thanks. If one requires the JAVA_VERSION environment variable inside the build, then this is necessary. I just need it to identify the image to use.

@@ -0,0 +1,16 @@
ARG JAVA_VERSION=11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the name Dockerfile.build the accepted standard?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. This file is intentionally named differently as it's used to create the build environment. The Science Portal requires Gradle, JDK 11, and NPM, and if you like keeping your desktop clean, then this is used to build an image that can be used to build the Science Portal.

docker run --rm -ti -v $(pwd):/app -w /app image-from-dockerfile-build gradle -i clean build test

@at88mph at88mph merged commit 4597eff into opencadc:SP-3544 Jun 13, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants