-
Notifications
You must be signed in to change notification settings - Fork 1
Ubuntu-based image with Java, Node.js and Google Chrome #1
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
Open
edkennard
wants to merge
3
commits into
master
Choose a base branch
from
ubuntu-based
base: master
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.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 hidden or 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,2 @@ | ||
.idea | ||
*.iml |
This file contains hidden or 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,3 +1,37 @@ | ||
FROM node:14.20-alpine3.15 | ||
# Hard-wire platform since our Node.js builds only ever need to be on amd64. | ||
FROM --platform=linux/amd64 ubuntu:22.04 | ||
|
||
RUN apk add --update openjdk17-jre patch | ||
ARG NODE_VERSION=14.21.3 | ||
ARG JAVA_VERSION=17.0.12-1 | ||
|
||
# For available versions see https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-stable | ||
ARG CHROME_VERSION="132.0.6834.83-1" | ||
|
||
SHELL [ "/bin/bash", "-o", "pipefail", "-c" ] | ||
|
||
# Install basic tools | ||
RUN apt-get update && apt-get clean && apt-get -qy upgrade | ||
RUN apt-get -qy install --no-install-recommends gnupg ca-certificates curl bash vim nano jq wget | ||
|
||
# Install Java for use by OpenAPI code generator | ||
RUN curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg | ||
RUN echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" > /etc/apt/sources.list.d/zulu.list | ||
RUN apt-get update && \ | ||
apt-get -qy install --no-install-recommends zulu17-ca-jre-headless=${JAVA_VERSION} libjemalloc2 && \ | ||
apt-get clean && \ | ||
jonfox marked this conversation as resolved.
Show resolved
Hide resolved
|
||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install NVM then use that to install the required version of Node.js | ||
ENV NVM_DIR=/usr/local/nvm | ||
RUN mkdir -p /usr/local/nvm | ||
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash | ||
RUN source "$NVM_DIR/nvm.sh" && nvm install "v$NODE_VERSION" && nvm use $NODE_VERSION | ||
ENV NODE_PATH="$NVM_DIR/versions/node/v$NODE_VERSION/bin" | ||
ENV PATH=$NODE_PATH:$PATH | ||
|
||
# Install Google Chrome for running unit tests in headless mode. It's important NOT to use Chromium which requires snap | ||
# which can cause issues when running the Karma tests. | ||
RUN apt-get update | ||
RUN curl -LO https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb | ||
RUN apt install -y ./google-chrome-stable_${CHROME_VERSION}_amd64.deb | ||
RUN rm google-chrome-stable_${CHROME_VERSION}_amd64.deb | ||
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. Likewise here, the deb is already in the curl layer above |
This file contains hidden or 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,3 +1,3 @@ | ||
# Node build image | ||
|
||
A basic node build image with java installed | ||
A basic node build image with Node.js, Java and Google Chrome installed |
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.
I wouldn't do this - no reason not to do a multi arch build. I'm moving over TeamCity agents to be ARM where we can to save costs