Skip to content
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

Issu to install Netconf Explorer #33

Open
Anajake opened this issue Nov 3, 2022 · 1 comment
Open

Issu to install Netconf Explorer #33

Anajake opened this issue Nov 3, 2022 · 1 comment

Comments

@Anajake
Copy link

Anajake commented Nov 3, 2022

Hi everybody,
I have a problem to install advance netconf explorer on debian GNU/Linux rodete, can you help me please?

@maxwifiJames
Copy link

Solved by the below edit to the Dockerfile

FROM debian:buster-slim
LABEL maintainer="Steven Barth stbarth@cisco.com"

Copy application source files to the image

COPY anc /src/anc/
COPY explorer /src/explorer/
COPY grpc /src/grpc/
COPY pom.xml /src/

Install Java, Jetty, and Maven

RUN mkdir -p /usr/share/man/man1 &&
apt update &&
apt -y --no-install-recommends install openjdk-11-jdk jetty9 maven

Set JAVA_HOME environment variable to the correct path for ARM architecture

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64
ENV PATH="${JAVA_HOME}/bin:${PATH}"

Set working directory

WORKDIR /src

Verify Java installation and print version information

RUN echo "JAVA_HOME is set to $JAVA_HOME" &&
java -version &&
mvn -v &&
find /usr/lib/jvm -name "java*"

Run Maven commands to clean, package, and generate javadocs

RUN mvn clean package javadoc:javadoc

Copy the WAR file to Jetty's webapps directory and add API docs

RUN cp /src/explorer/target/*.war /var/lib/jetty9/webapps/ROOT.war &&
cp -a /src/anc/target/site/apidocs /var/lib/jetty9/webapps/

Create the yangcache directory and set permissions

RUN mkdir -p /usr/share/yangcache && chmod -R 755 /usr/share/yangcache /var/lib/jetty9/webapps/

Clean up build artifacts and unnecessary packages to reduce image size

RUN rm -rf /var/lib/jetty9/webapps/root /src /root/.m2 &&
apt remove -y maven && apt -y autoremove && apt clean

Set the working directory, expose port 8080, and specify the entry command

WORKDIR /
EXPOSE 8080
CMD ["/usr/share/jetty9/bin/jetty.sh", "run"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants