-
Notifications
You must be signed in to change notification settings - Fork 154
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
Adding Dockerfile and bash scripts to build and run Docker containers #93
Merged
Merged
Changes from all commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
9d41f78
Adding Dockerfile and bash scripts to build and run Docker containers
neomatrix369 96d2493
Replaced old method of building and running Docker image for graalvm-…
neomatrix369 d50bb75
Minor changes: use full graalvm version information, and apply it to …
neomatrix369 8ce10f2
Updated the master README with instructions on how to use the docker …
neomatrix369 a3c9ce5
Cosmetic: Amend the display message about GraalVM image. Install the …
neomatrix369 c4bd32d
Multiple changes:
neomatrix369 2f46b7a
Adding comments to the Dockerfile
neomatrix369 6813be8
hello-graal example: Adding a couple of files to ignore
neomatrix369 338d0d4
native-list-dir example: Adding a couple of files to the git ignore list
neomatrix369 588fd17
Cosmetic changes to the Dockerfile
neomatrix369 7077556
Mount .m2 folder outside the container, make JAVA_HOME, same as GRAAL…
neomatrix369 55cf1ae
Separated wrk and micronaut-starter binaries into separate docker bas…
neomatrix369 c3f6cc0
Moved docker-related Dockerfiles and shellscript into a separate folder
neomatrix369 fcc2b38
README: updated the master README.md with the new path to the buildDo…
neomatrix369 bcf2fbf
Adding macOS related file to ignore
neomatrix369 bdffc2a
.gitignore: Consolidating two folders and replacing it with the paren…
neomatrix369 ca75d25
Comments: added minor comments to help with finding tags for GraalVM …
neomatrix369 b7033ce
Install jmeter to the image, open ports 8081 and 8443 to docker host,…
neomatrix369 2025341
Adding scala and sbt to the image, setting SCALA_HOME and also mappin…
neomatrix369 0306773
Adding some more filenames/patterns to the git ignore list
neomatrix369 6dec766
Dockerfile: minor corrections (comment on a new line), setting the MI…
neomatrix369 55446ca
Replaced old ways of installing Scala and sbt with newer way, it's al…
neomatrix369 56c2e7b
Refactored docker related files and the order in which components are…
neomatrix369 763cede
GraalVM Version Parameter: simplified the way the full GraalVM Versio…
neomatrix369 de39c64
Tag the micronaut/starter docker image version with the graalvm versi…
neomatrix369 50f0c20
Shell scripts: checking the passed in GraalVM version tag parameter f…
neomatrix369 4cb2e49
Test and update Native jshell and Espresso demo
olyagpl f9d0f62
Remove the demo as per agreement
olyagpl 42956dc
Review and update FunctionGraph Demo
olyagpl 433ca58
Review Galaaz Demo
olyagpl 6c6295b
Review and update GraalVM Demos: Hello Graal
olyagpl b1eebd2
Review and update Java Kotlin Interoperability and AOT Compilation Demo
olyagpl aa42100
Review and update java-simple-stream-benchmark and native-list-dir demos
olyagpl 7105d93
Test and update js-java-async-helidon demo
olyagpl c5cc57e
Test and update Micronaut Demo with Python for Data Visualization
olyagpl 44939e6
Fix formatting
olyagpl d3c3db7
Remove MLE demo folder. Check the website examples for it
olyagpl 6c3e2fa
Test and update multithreading-demo, native-list-dir demos
olyagpl f8be6f6
Test and update multithreading-demo, native-image-configure-examples,…
olyagpl 8cec0d8
Test Micronaut with GraalVM Native Image and Docker
olyagpl c94aaef
Test and update spring-r, polyglot-javascript-java-r, native-image-wo…
olyagpl 8754b28
Test and update scala-examples
olyagpl b037cc7
Merge branch 'master' into provide-Docker-scripts
neomatrix369 931ad42
Adding Gradle build step to the Docker steps
neomatrix369 6736914
GRAALVM_HOME: changing all references from GRAALVM_HOME to JAVA_HOME,…
neomatrix369 9a84d98
Amending maven version to 3.8.3, hiding unneeded echoes from sbt -ver…
neomatrix369 ba0bf08
GUI apps: with the enhanced version the previous docker container, it…
neomatrix369 610ee5c
Added numpy to the list of packages to be installed by ginstall when …
neomatrix369 fad1795
micronaut-python: fixed by adding the javax.inject package to the bui…
neomatrix369 4c0f1dd
Removing the check for image as this is already done when docker buil…
neomatrix369 57c03d3
Adding >&2 to echo-s in the two shellscripts, helps when running on e…
neomatrix369 857a2e8
Add a note in the README on how to access GUI-apps via a VNCViewer
neomatrix369 e02a9ed
DockerHub source: converting the scripts (and docs) to refer to Graal…
neomatrix369 cd59f1a
README: Updating instructions on how to invoke the GUI interface via …
neomatrix369 84d7286
graalpython-notebook-example: removed 'numpy' from pom.xml as it's no…
neomatrix369 ded0556
gu: adding R to the list of gu installation steps
neomatrix369 714e155
TruffleRuby: install TruffleRuby, a couple of dependencies and patch …
neomatrix369 c474bdf
native-image: install native-image in the docker image, using the gu …
neomatrix369 fdccdc7
GUI apps: adding linux dependencies to support GUI apps
neomatrix369 4f9ed94
Older demos: temporarily adding the GRAALVM_DIR env variable to the d…
neomatrix369 80dcd85
Adding a couple of items to the ignore list: wheel files and fastR-ex…
neomatrix369 0b162ed
Added the additional Linux dependencies for graalpython
neomatrix369 9d32061
Fix scalac demos
vjovanov 1b56c28
Docker: amending the Docker related scripts to now take into account …
neomatrix369 32bb9f4
Ruby: be able to run post_install_hook.sh on both older and newer Gra…
neomatrix369 f1df974
Amend the gui based image to install dependencies for TruffleRuby, an…
neomatrix369 0e3505d
Merge branch 'master' into provide-Docker-scripts
neomatrix369 c938fe7
Moving gcc and make installation from the gui image to the console-ba…
neomatrix369 7f0b92a
Removing the remaining deleted files in the micronaut-python folder
neomatrix369 8b91f12
Reinstating GRAALVM_HOME till all demos test fine
neomatrix369 ef6ef25
Adding flag to enable stack trace when native-image building fails, a…
neomatrix369 2e1470e
Moved the step that runs the rebuilding of Ruby to the console part o…
neomatrix369 f03fbea
Use env variable GRAALVM_HOME instead of a mix of other env variables…
neomatrix369 0bcf891
Build base docker image using debian:buster in place of buildpack-dep…
neomatrix369 5ac240e
Install locale in a sequence that ruby's 'gem install' can pick the n…
neomatrix369 8b7e9d5
Install bzip2 for the ruby demo. Check for xxx-demo and xxx-demo-gui …
neomatrix369 0464af4
Ruby: adding a simple test to verify the steps/process involved in th…
neomatrix369 674fac4
Python: adding a simple test to verify the steps/process involved in …
neomatrix369 cc0e47e
Ruby: removing the unneeded comma when installing the ruby gems
neomatrix369 ea0a6c8
graalpython demo: update the install-deps shellscript to use /home/sa…
neomatrix369 608c5be
Adding the venv folder to the ignore list
neomatrix369 fb75893
curl: installing ca-certificates so commands like wget and curl do no…
neomatrix369 b6011bf
graalpython demo: updating the README to include an additional step t…
neomatrix369 3e36c7c
Docker image check: display download image progress while image is be…
neomatrix369 fef2d92
R: adding the libc++-dev depencency to help with the galaaz-ggplot de…
neomatrix369 2ef8d3a
Adding files to the ignore list after runnin espresso and native-list…
neomatrix369 36f1c47
ca-certs: moving the ca-certificates package to the higher docker ima…
neomatrix369 38afd46
Changing GRAALVM_HOME to /opt/graalvm and using the variable when cop…
neomatrix369 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
shared | ||
_dot_gradle_folder | ||
_dot_m2_folder | ||
.git | ||
.gitmodules | ||
.idea |
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
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
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,139 @@ | ||
ARG DOCKER_USER_NAME | ||
ARG SOURCE_DOCKER_HUB | ||
ARG FULL_GRAALVM_VERSION | ||
|
||
FROM ${SOURCE_DOCKER_HUB}:${FULL_GRAALVM_VERSION} as graalvm-jdk-image | ||
FROM ${DOCKER_USER_NAME}/micronaut-starter:${FULL_GRAALVM_VERSION} as micronaut-starter-image | ||
FROM ${DOCKER_USER_NAME}/workload-generator as workload-generator | ||
|
||
FROM debian:buster | ||
|
||
COPY --from=workload-generator /tmp/wrk/wrk /usr/local/bin | ||
RUN echo "Testing 'wrk':"; wrk || true | ||
|
||
# Install other smaller utilities needed during building of image in the slim image | ||
RUN echo; echo "--- Installing wget, curl, vim, unzip in the slim image"; echo | ||
RUN apt-get update \ | ||
&& apt-get install -yq --no-install-recommends \ | ||
wget curl vim unzip gnupg2 \ | ||
make gcc g++ libc++-dev \ | ||
openssl libssl-dev libcrypto++-dev libz.a \ | ||
locales ca-certificates | ||
RUN apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* | ||
|
||
# https://www.rosehosting.com/blog/configure-system-locale-on-debian-9/ | ||
# https://people.debian.org/~schultmc/locales.html <-- simple steps | ||
RUN echo "--- Installing and setting locales" | ||
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen | ||
ENV LANG="en_US.UTF-8" | ||
ENV LANGUAGE="en_US" | ||
RUN locale-gen | ||
RUN echo; echo "LANG=${LANG}"; echo "LANGUAGE=${LANGUAGE}"; | ||
RUN echo; echo "List of installed locales:"; locale -a; echo; | ||
|
||
# Install gcc and make | ||
RUN echo "gcc version: "; gcc --version | ||
RUN echo "make version: "; make --version | ||
|
||
ARG GRAALVM_HOME | ||
|
||
# Install and setup GraalVM | ||
COPY --from=graalvm-jdk-image /opt/graalvm-* ${GRAALVM_HOME} | ||
|
||
ENV JAVA_HOME=${GRAALVM_HOME} | ||
ENV PATH=${JAVA_HOME}/bin:${PATH} | ||
RUN echo; echo "JAVA_HOME=${JAVA_HOME}"; echo | ||
RUN echo; echo " --- GraalVM version (runtime)"; java -version; echo | ||
|
||
# Install some of the needed components using 'gu install' | ||
RUN echo; echo " --- Download & install 'espresso' using gu"; gu install espresso; echo | ||
RUN echo; echo " --- Download & install 'nodejs' using gu"; gu install nodejs; echo | ||
RUN echo; echo " --- Download & install 'python' using gu"; gu install python; echo | ||
RUN echo; echo " --- Download & install 'R' using gu"; gu install R; echo | ||
RUN echo; echo " --- Download & install 'Ruby' using gu"; gu install ruby; echo | ||
neomatrix369 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RUN echo; echo " --- Download & install 'native-image' using gu"; gu install native-image; echo | ||
|
||
# Rebuild Ruby to make the Ruby openssl C extensions to work with the local system libssl (see https://github.com/oracle/truffleruby/blob/master/doc/user/installing-graalvm.md#installing-ruby-and-other-languages) | ||
RUN echo "Rebuilding Ruby to make the Ruby openssl C extensions to work with the local system libssl" | ||
|
||
RUN export RUBY_POST_HOOK_SCRIPT="$(find ${GRAALVM_HOME} -name *post_install_hook.sh*)"; \ | ||
chmod +x ${RUBY_POST_HOOK_SCRIPT}; \ | ||
bash ${RUBY_POST_HOOK_SCRIPT}; | ||
# At the moment this is a simple litmus test to verify that the above step has actually worked! | ||
RUN echo "Installing ruby gems to verify if the above installation and rebuilding processes are working..." | ||
RUN gem install rspec galaaz | ||
|
||
RUN echo "gcc version: "; gcc --version | ||
RUN echo "make version: "; make --version | ||
|
||
# https://github.com/oracle/truffleruby/blob/master/doc/user/ruby-managers.md#chruby | ||
RUN if [ -e "${GRAALVM_HOME}/jre" ]; then ruby_home=$(${GRAALVM_HOME}/jre/languages/ruby/bin/ruby -e 'print RbConfig::CONFIG["prefix"]'); else ruby_home=$(${GRAALVM_HOME}/languages/ruby/bin/ruby -e 'print RbConfig::CONFIG["prefix"]'); fi | ||
|
||
|
||
# Install Java 8 | ||
COPY --from=java:8u111-jdk /usr/lib/jvm /usr/lib/jvm | ||
|
||
ENV JDK8_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64" | ||
RUN echo; echo "JDK8_HOME=${JDK8_HOME}"; echo | ||
RUN echo; echo "PATH=${PATH}"; echo | ||
RUN echo " --- Java 8 version:"; ${JDK8_HOME}/bin/java -version; echo | ||
|
||
# Install mvn | ||
ARG MAVEN_VERSION | ||
RUN cd /tmp | ||
RUN wget -q -nv https://raw.githubusercontent.com/Drambluker/install-maven/main/install-maven.sh | ||
RUN wget -q -nv "https://www.mirrorservice.org/sites/ftp.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz" | ||
RUN chmod +x ./install-maven.sh | ||
RUN ./install-maven.sh -f apache-maven-${MAVEN_VERSION}-bin.tar.gz | ||
ENV M2_HOME="/usr/local/apache-maven/apache-maven-${MAVEN_VERSION}/" | ||
ENV PATH=${M2_HOME}/bin:${PATH} | ||
RUN echo " --- Maven version:"; mvn --version; echo | ||
|
||
# Install gradle | ||
ARG GRADLE_VERSION | ||
RUN cd /tmp/; wget -q -nv https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip | ||
RUN cd /tmp/; unzip gradle-${GRADLE_VERSION}-bin.zip && mv gradle-${GRADLE_VERSION} / | ||
ENV GRADLE_HOME="/gradle-${GRADLE_VERSION}" | ||
ENV PATH=${GRADLE_HOME}/bin:${PATH} | ||
RUN echo " --- Gradle version:"; gradle --version; echo | ||
|
||
# Install jmeter | ||
RUN cd /tmp/; wget -q -nv "https://dlcdn.apache.org//jmeter/binaries/apache-jmeter-5.4.1.zip" | ||
RUN unzip /tmp/apache-jmeter-5.4.1.zip | ||
ENV JMETER_HOME="${WORKDIR}/apache-jmeter-5.4.1" | ||
ENV PATH=${JMETER_HOME}/bin:${PATH} | ||
RUN echo " --- Jmeter version:"; jmeter --version; echo | ||
|
||
# Install scala and sbt | ||
ARG SBT_VERSION | ||
RUN echo; echo "--- Installing scala and sbt in the slim image"; echo | ||
# See https://www.scala-sbt.org/download.html | ||
RUN cd /tmp/; wget -q -nv https://github.com/sbt/sbt/releases/download/v${SBT_VERSION}/sbt-${SBT_VERSION}.zip | ||
RUN cd /tmp/; unzip sbt-${SBT_VERSION}.zip; mv sbt /usr/share; ln -s /usr/share/sbt/bin/sbt /usr/bin/sbt | ||
RUN echo "sbt version:"; sbt --version | grep "sbt script version"; echo | ||
|
||
ARG SCALA_VERSION | ||
# See https://www.scala-lang.org/download/ | ||
RUN cd /tmp/; wget -q -nv https://github.com/lampepfl/dotty/releases/download/${SCALA_VERSION}/scala3-${SCALA_VERSION}.zip | ||
RUN cd /tmp/; unzip scala3-${SCALA_VERSION}.zip; mv scala3-${SCALA_VERSION} /usr/share/scala; | ||
RUN ln -s /usr/share/scala /usr/share/scala-${SCALA_VERSION}; ln -s /usr/share/scala/bin/scala /usr/bin/scala | ||
RUN echo "scala version:"; scala -version; echo | ||
|
||
# this location maps to the specific vesion of Scala for e.g. scala-2.12 or 3.0.2 | ||
ENV SCALA_HOME="/usr/share/scala" | ||
RUN echo; echo "SCALA_HOME=${SCALA_HOME}"; echo | ||
|
||
COPY --from=micronaut-starter-image /root/.micronaut/micronaut-cli /root/.micronaut/micronaut-cli | ||
ENV MICRONAUT_HOME="/root/.micronaut/micronaut-cli" | ||
ENV PATH=${MICRONAUT_HOME}/bin:${PATH} | ||
RUN echo; echo " --- Micronaut version"; mn --version; echo | ||
|
||
# Some demo apps require this env variable set | ||
ENV GRAALVM_HOME=${GRAALVM_HOME} | ||
RUN echo; echo "GRAALVM_HOME=${GRAALVM_HOME}"; echo | ||
|
||
LABEL maintainer="GraalVM team" | ||
LABEL example_git_repo="https://github.com/graalvm/graalvm-demos" | ||
LABEL graalvm_version=${FULL_GRAALVM_VERSION} | ||
LABEL version=${FULL_GRAALVM_VERSION} |
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 @@ | ||
# https://www.cloudsavvyit.com/10520/how-to-run-gui-applications-in-a-docker-container/ - latter part of the blog | ||
|
||
ARG DOCKER_USER_NAME | ||
ARG FULL_GRAALVM_VERSION | ||
FROM ${DOCKER_USER_NAME}/graalvm-demos:${FULL_GRAALVM_VERSION} | ||
|
||
# Install xterm in order to be able to access it when running GUI apps | ||
RUN apt-get update \ | ||
&& apt-get install -yq --no-install-recommends \ | ||
x11vnc xvfb xterm \ | ||
xfonts-75dpi xfonts-100dpi xfonts-base \ | ||
libfontconfig1 libxrender1 libxtst6 \ | ||
libgomp1 zlib1g liblzma5 libc6 \ | ||
libbz2-1.0 bzip2 patch \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* | ||
|
||
RUN echo "gcc version: "; gcc --version | ||
RUN echo "make version: "; make --version | ||
|
||
# https://askubuntu.com/questions/161652/how-to-change-the-default-font-size-of-xterm#161704 | ||
RUN echo "exec xterm -maximized -fa 'Monospace' -fs 18" > \ | ||
~/.xinitrc && chmod +x ~/.xinitrc | ||
RUN echo ""; echo "Contents of ~/.xinitrc"; echo ""; cat ~/.xinitrc; echo ""; | ||
RUN echo "xterm*font: *-Monospace-*-*-*-18-*" > ~/.Xresources | ||
RUN echo ""; echo "Contents of ~/.Xresources"; echo ""; cat ~/.Xresources; echo ""; | ||
|
||
# Adding environment variable to support older demos that rely on the GRAALVM_DIR env variable | ||
ENV GRAALVM_DIR="${JAVA_HOME}" | ||
RUN echo "GRAALVM_DIR=${GRAALVM_DIR}" | ||
RUN echo "GRAALVM_HOME=${GRAALVM_HOME}" | ||
|
||
LABEL maintainer="GraalVM team" | ||
LABEL example_git_repo="https://github.com/graalvm/graalvm-demos" | ||
LABEL graalvm_version=${FULL_GRAALVM_VERSION} | ||
LABEL version=${FULL_GRAALVM_VERSION} | ||
|
||
# manual: https://linux.die.net/man/1/x11vnc | ||
CMD ["x11vnc", "-create", "-forever", "-geometry", "1024x768"] |
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,35 @@ | ||
ARG SOURCE_DOCKER_HUB | ||
ARG FULL_GRAALVM_VERSION | ||
FROM ${SOURCE_DOCKER_HUB}:${FULL_GRAALVM_VERSION} as graalvm-jdk-image | ||
|
||
FROM buildpack-deps:stretch-scm | ||
|
||
# Install smaller utilities needed during building of image in the slim image | ||
RUN echo; echo "--- Installing wget, curl, vim, unzip in the slim image"; echo | ||
RUN apt-get update && \ | ||
apt-get install -yq --no-install-recommends unzip git | ||
|
||
ARG GRAALVM_HOME | ||
|
||
# Install and setup GraalVM | ||
COPY --from=graalvm-jdk-image /opt/graalvm-* ${GRAALVM_HOME} | ||
|
||
ENV JAVA_HOME=${GRAALVM_HOME} | ||
ENV PATH=${GRAALVM_HOME}/bin:${PATH} | ||
RUN echo; echo "JAVA_HOME=${JAVA_HOME}"; echo | ||
RUN echo; echo " --- GraalVM version (runtime)"; java -version; echo | ||
|
||
# Build and Install micronaut | ||
RUN cd /tmp; git clone https://github.com/micronaut-projects/micronaut-starter.git | ||
RUN cd /tmp/micronaut-starter; ./gradlew micronaut-cli:assembleDist | ||
RUN mkdir -p ~/.micronaut; unzip /tmp/micronaut-starter/starter-cli/build/distributions/micronaut-cli-*.zip -d ~/.micronaut | ||
ENV MICRONAUT_HOME="/root/.micronaut/micronaut-cli" | ||
RUN OLD_NAME=$(ls ~/.micronaut); mv ~/.micronaut/${OLD_NAME} ${MICRONAUT_HOME} | ||
RUN echo "MICRONAUT_HOME=${MICRONAUT_HOME}"; \ | ||
ls -lash ${MICRONAUT_HOME}/bin; \ | ||
echo; echo "micronaut version:"; ${MICRONAUT_HOME}/bin/mn --version; echo | ||
|
||
LABEL maintainer="GraalVM team" | ||
LABEL git_repo="https://github.com/micronaut-projects/micronaut-starter.git" | ||
LABEL graalvm_version=${FULL_GRAALVM_VERSION} | ||
LABEL version=${FULL_GRAALVM_VERSION} |
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,15 @@ | ||
FROM buildpack-deps:stretch-scm | ||
|
||
# Build and Install wrk in the slim image, see https://github-wiki-see.page/m/giltene/wrk2/wiki/Installing-wrk2-on-Linux | ||
RUN echo; echo "--- Installing wrk: workload generator (multiple threads)"; echo | ||
RUN apt-get update | ||
RUN apt-get install -yq --no-install-recommends build-essential libssl-dev git unzip | ||
|
||
RUN cd /tmp; git clone https://github.com/wg/wrk.git | ||
RUN cd /tmp/wrk; make | ||
RUN chmod +x /tmp/wrk/wrk; cp /tmp/wrk/wrk /usr/local/bin | ||
RUN echo "Testing 'wrk':"; wrk || true | ||
|
||
LABEL maintainer="GraalVM team" | ||
LABEL git_repo="https://github.com/wg/wrk.git" | ||
LABEL version=0.1 |
Oops, something went wrong.
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.
Is there a reason to use debian here instead of e.g. the official GraalVM Docker image from https://github.com/graalvm/container/pkgs/container/graalvm-ce ?
That might make things easier, because we test on OracleLinux in CI.
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.
Good point, no we can use GraalVM as the base image, thanks for confirming this saves building time.
The original code evolved such that I swayed away from this approach due to some issues but I can revert to your suggestion.
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.
How do you install packages in the Graalvm docker image,
apt
oraptitude
is not available?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.
https://github.com/graalvm/container/tree/master/truffleruby#installing-system-packages
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.
microdfn
isn't able to findg++
,libc++-dev
,libssl-dev
, the latter fixed the TruffleRuby and FastR issues we had withgalaaz
demosThere 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.
In this Dockerfile, it's reusing some files from the offical Docker images, but transplanting on debian:buster.
That's absolutely not guaranteed to work, it feels pretty hacky honestly. For instance the files in the official images might already be tweaked to run on OracleLinux, for instance https://github.com/graalvm/container/blob/326e236ee937de37769e0709505dafdb7a6a9f78/community/Dockerfile.java11#L44-L53.
I'm checking with @ezzarghili, I think there is a way to install rpm's for each component/language, and that should automatically install all required system dependencies. They are currently working on having 21.3 Docker images with those rpm packages.
Maybe we can even have a Docker image with all components pre-installed, that sounds ideal for this use-case, isn't it?
IMHO trying to minimize dependencies below what is marked as requirement for each component is not a good thing and will just into problems, e.g., I think nobody is happy to help you debug if you on purpose skipped some documented dependency.
I don't understand the concern about image size here. It's a repo of demos with all languages, of course the image will be big, and I don't think it's much of an issue.
I understand it's easier for you for now to use debian-based images and you don't want to change everything right now.
But if we get something like Docker images with rpms or already all components we should use that, instead of hardcoding and manually finding system dependencies in yet another place.
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 agree with using them - as this would be ideal and makes it consistent. If a standard image/config for Docker or anything of that sort is available, I would just like to use it as it would work out-of-the-box as you mentioned earlier.
I don't fully agree about your comment about "hacky" in this context, I will agree it's less optimum or less efficient, but it's done in the absence of the standard image or the know-how about it.
I will say the same about the docs, they are not necessary if you have config files and single-line commands to create images using those config files (I see you have these in different places in some form or shape). Incorporating existing config or images and building on top of them is more appropriate. That idea is still in the files/scripts in the script, maybe it's not visible, reusing components is definitely the way to go.
What has happened here is actually a bit of reinvention of the wheel, which is debatable if it could have been avoided but now we learning from what's available, happy to adapt them. This will also reduce the calls to various teams for help in case something does not work - I do not wish to do this either, it can hold up the process on this end as well.
After all of this, there is still chances of something not working but then those are much less. Also, peer review helps iron out these glitches, and it's a one-off because when this works it will always work unless the upstream regresses or something specific has been changed downstream.
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.
This is something I would have been doing in my second refactor round for these scripts, but if this is already in the planning then I can wait and adapt those images and build on top of them - thanks for letting me know I will keep an eye for it
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.
Only for now, but it's on my mental list to change it. But I'm always happy to change the docker and shell scripts -- if we can reduce all the lines written to a few lines then that's a better solution and reusing existing images could be a way towards that.
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.
Thinking of this again, you are right, I'll take that back -- image size should not be an issue, especially to avoid inconsistency and be able to reproduce issues on the same image type. A whole chain of things can happen if images differ in signature, and be hard to trackback or investigate, as the number of moving parts are increasing.