-
Notifications
You must be signed in to change notification settings - Fork 95
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
Add Dockerfile and use docker in CI #2166
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 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
Next
Next commit
-Add Dockerfile.
-Add docker-tests profile. -Update CI to use docker image. -Update docs.
- Loading branch information
commit 296ef8f382f58d5cc4c665893ea305ba348951ab
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
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,21 @@ | ||
Docker | ||
=============== | ||
|
||
In an effort to ensure consistency of deployment, testing and build environments, we have a Dockerfile that developers | ||
may use to build a docker image. The following instructions assume that the developer is using linux and has Docker installed:: | ||
|
||
cd misc/ | ||
sudo docker build -t phoebus:latest . | ||
sudo docker run -it phoebus:latest | ||
|
||
|
||
|
||
From another shell(make sure to leave the previous shell open):: | ||
|
||
sudo docker cp phoebus [CONTAINER_ID]:/ | ||
|
||
|
||
You may also pull the following image from docker hub if you don't want to build the image yourself:: | ||
|
||
sudo docker pull lgomezwhl/phoebus-ci:latest | ||
|
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,42 @@ | ||
Eclipse Debugging | ||
================= | ||
|
||
Download Eclipse Oxygen 4.7.1a or later from http://download.eclipse.org/eclipse/downloads/ | ||
|
||
Start Eclipse like this:: | ||
|
||
export JAVA_HOME=/path/to/your/jdk-9-or-later | ||
export PATH="$JAVA_HOME/bin:$PATH" | ||
eclipse/eclipse -consoleLog | ||
|
||
Check Eclipse Preferences:: | ||
|
||
Java, Installed JREs: JDK 9-or-later should be the default | ||
Java, Compiler: JDK Compliance should be "9" or higher | ||
|
||
Debugging with Eclipse | ||
|
||
This assumes the project has been imported as a maven project into Eclipse(see instructions in README):: | ||
|
||
1. Open Eclipse | ||
2. Go to `Run->External Tools->External Run COnfigurations` | ||
3. Create a new `Program` configuration. Set location to `usr/bin/java` on linux. | ||
This is the location of the Java executable. For any other OS, it should not be too hard | ||
to find that directory. | ||
4. Set `Working Directory` to `phoebus/phoebus-product/target`. | ||
5. Set arguments to: | ||
``` | ||
--add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true | ||
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar path_to_repo/phoebus/phoebus-product/target/product-4.6.6-SNAPSHOT.jar | ||
``` | ||
6. Click `Run`. The Eclipse console should output a port number. Write it down; we'll use it for | ||
debugging later on. | ||
7. Go to `Debug Configurations` | ||
8. Create a new `Remote Java Application` | ||
9. Click on the `Source` tab and make sure all of the sub-modules/projects of the phoebus project | ||
are checked. This will allow you to travel through source code when debugging code in Eclipse. | ||
10. For port, add the port from step 6. | ||
11. Click `Debug` | ||
|
||
|
||
Now this should connect to your JVM process you started on step 6 and you start debugging your code. Happy debugging! |
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,11 @@ | ||
FROM ubuntu:18.04 | ||
RUN apt update | ||
lorenzo-gomez-windhover marked this conversation as resolved.
Show resolved
Hide resolved
|
||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y locales | ||
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ | ||
dpkg-reconfigure --frontend=noninteractive locales && \ | ||
update-locale LANG=en_US.UTF-8 | ||
ENV LANG en_US.UTF-8 | ||
RUN apt-get install -y openjdk-11-jdk | ||
RUN apt-get install -y maven | ||
RUN apt-get install -y openjfx | ||
RUN echo "export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/" >> /root/.bashrc |
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
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 any reason for using ubuntu:18.04? It is not the latest LTS version for Ubuntu.
Have you tried using the official images for OpenJDK or even Maven?
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.
There is no reason. I just forgot that Ubuntu 18 is not LTS anymore :).