-
Notifications
You must be signed in to change notification settings - Fork 0
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
Node with JDK17 #9
Draft
wzieba
wants to merge
6
commits into
trunk
Choose a base branch
from
jdk17_and_node
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
389e558
Add node
oguzkocer ed6281e
Do not install `android-sdk` and `android-sdk-build-tools`
wzieba 120e114
Update `commandlinetools` to `linux-11076708`
wzieba 3f526e4
Use `gradle:8.2.1-jdk17` image
wzieba d60763d
Fix NVM installation
wzieba 9d1710c
Add `npm` to `PATH`
wzieba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||||
---|---|---|---|---|---|---|
@@ -1,11 +1,15 @@ | ||||||
# syntax=docker/dockerfile:1 | ||||||
FROM debian:stable | ||||||
FROM gradle:8.2.1-jdk17 | ||||||
|
||||||
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | ||||||
|
||||||
# Increase the file watcher limit for node. This should not be necessary for CI builds since watchers should be disabled, but it can be useful when running this image in a local environment. | ||||||
RUN echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf | ||||||
|
||||||
# Install system commands, Android SDK, and Ruby | ||||||
RUN apt-get update \ | ||||||
&& apt-get install -y coreutils git wget locales android-sdk android-sdk-build-tools \ | ||||||
&& apt-get install -y coreutils git wget locales \ | ||||||
&& apt-get install -y curl git php-cli php-mbstring \ | ||||||
&& apt-get -y autoclean | ||||||
|
||||||
# Set up the default locale | ||||||
|
@@ -15,9 +19,9 @@ ENV ANDROID_HOME=/usr/lib/android-sdk | |||||
ENV GRADLE_OPTS="-Xmx6G -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.caching=true -Dorg.gradle.configureondemand=true -Dkotlin.compiler.execution.strategy=in-process -Dkotlin.incremental=false" | ||||||
|
||||||
# Download the SDK Manager | ||||||
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip \ | ||||||
&& unzip commandlinetools-linux-6858069_latest.zip && rm commandlinetools-linux-6858069_latest.zip \ | ||||||
&& mkdir /usr/lib/android-sdk/cmdline-tools \ | ||||||
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \ | ||||||
&& unzip commandlinetools-linux-11076708_latest.zip && rm commandlinetools-linux-11076708_latest.zip \ | ||||||
&& mkdir -p /usr/lib/android-sdk/cmdline-tools \ | ||||||
&& mv cmdline-tools /usr/lib/android-sdk/cmdline-tools/latest | ||||||
|
||||||
ENV PATH="//usr/lib/android-sdk/cmdline-tools/latest/bin:${PATH}" | ||||||
|
@@ -38,13 +42,11 @@ RUN mkdir scripts | |||||
COPY scripts/ scripts/ | ||||||
ENV PATH="/scripts/:${PATH}" | ||||||
|
||||||
# Cache Gradle 8.2.1 | ||||||
RUN mkdir gradle-cache-tmp \ | ||||||
&& cd gradle-cache-tmp \ | ||||||
&& wget https://services.gradle.org/distributions/gradle-8.2.1-bin.zip \ | ||||||
&& unzip gradle-8.2.1-bin.zip \ | ||||||
&& touch settings.gradle \ | ||||||
&& gradle-8.2.1/bin/gradle wrapper --gradle-version 8.2.1 --distribution-type all \ | ||||||
&& ./gradlew \ | ||||||
&& cd .. \ | ||||||
&& rm -rf ./gradle-cache-tmp \ | ||||||
SHELL ["/bin/bash", "--login", "-c"] | ||||||
ENV NODE_VERSION v20.11.0 | ||||||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \ | ||||||
&& source "$HOME/.nvm/nvm.sh" \ | ||||||
&& nvm install $NODE_VERSION | ||||||
ENV PATH="//root/.nvm/versions/node/$NODE_VERSION/bin:${PATH}" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
RUN which npm | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious: what made |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a specific number 😅