-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2166 from WindhoverLabs/ci
Add Dockerfile and use docker in CI
- Loading branch information
Showing
6 changed files
with
103 additions
and
2 deletions.
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,10 @@ | ||
FROM ubuntu:20.04 | ||
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