The yc-360 script can run as a sidecar container alongside your Java application container on the same Docker host. This configuration enables yc-360 script to capture critical diagnostic data from the target Java application, without requiring the script to run inside the same container.
The most straightforward way to enable cross-container access is by running the yc-360 script container with the --pid=host flag. This allows yc-360 script to observe all processes running on the host, including those inside other containers.
docker run --rm--pid=host ycrash/yc-360-script:latest ...
1
If you prefer to limit access to a specific container, you can use the following Docker runtime options instead of --pid=host:
--pid=container:java-container-id: Shares the process namespace with the target Java application container.
--net=container:java-container-id: Shares the network namespace with the Java application container.
--user root: Runs yc-360 as root to enable access to system-level tools.
-v /tmp:/tmp: Shares the /tmp directory between the Java application container and the yc-360 container, allowing yc-360 script to access .java_pid files required for JVM interaction.
docker run --rm--pid=container:4fdf503c2b6e --net=container:4fdf503c2b6e --user root -v /tmp:/tmp ycrash/yc-360-script:latest ...
1
These options grant the yc-360 script access only to the specified container’s process, network, and temporary file systems—minimizing exposure and improving security posture.
INFO
Examples in this documentation use --pid=host for simplicity. However, for production environments with stricter security requirements, the container-targeted approach is recommended.
You can run the yc-360 script in a standalone Docker environment (without Kubernetes) using one of the following methods:
Option 1: Use Official Docker Image
We provide a prebuilt Docker image for yc-360 script at: ycrash/yc-360-script:latest. Please follow the below instructions to pull the prebuild docker image and run the yc-360 script.
The script supports multiple execution modes tailored for various monitoring needs. Select your preferred mode below to see how to configure the script.
Replace the placeholders in the YAML configuration file with your actual values:
{API_KEY}: Your API key was provided with your license at the time of registration. If you're not sure where to find the API key, click here(opens new window).
{PID}: This is the process ID of your Java application running inside container. Not sure how to find process Id? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process in container. What is Unique Token?
1. Pull yc-360 script Docker image
docker pull ycrash/yc-360-script:latest
1
2. Run the yc-360 script Docker Container:
docker run --init-d-ti--rm-p8085:8085 --name yc-360-script --pid=host ycrash/yc-360-script:latest
1
The yc-360 script will now listen on port 8085. You can change the port using the port argument.
4. Execute the yc-360 Script: To run the yc-360 script in this mode, pass the -onlyCapture argument to the script.
{PID}: This is the process ID of your Java application running inside container. Not sure how to find process Id? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process in container. What is Unique Token?
{JAVA_HOME}: The directory path where Java is installed in your container. Pass /opt/java/openjdk to -j argument.
{APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).
Replace the placeholders in the YAML configuration file with your actual values:
{API_KEY}: Your API key was provided with your license at the time of registration. If you're not sure where to find the API key, click here(opens new window).
{JAVA_HOME}: The directory path where Java is installed in your container. Set this to /opt/java/openjdk.
{TOKEN_TO_IDENTIFY_PROCESS}: A unique keyword to identify your Java process. To learn more about this argument, see How the processToken Argument Works section.
{APPLICATION_NAME}: Friendly name for the application (shown in the yCrash dashboard).
docker run --init-d-ti--rm-p8085:8085 --name yc-360-script --pid=host -v$(pwd)/yc-config.yaml:/opt/workspace/yc-360-script/linux/yc-config.yaml ycrash/yc-360-script:latest
1
The yc-360 script will now listen on port 8085. You can change the port in the yc-config.yaml file using the port argument.
4. Execute the yc-360 Script:
When you run the yc-360 script container, it automatically reads the yc-config.yaml file and executes the script in M3 Mode.
Option 2: Build Your Own Docker Image
If you need customizations or want to bundle the yc-360 script into your own image, follow these steps:
The yc-360 script supports multiple execution modes tailored for various monitoring needs. Select your preferred mode below to see how to configure the script.
Replace the placeholders in the YAML configuration file with your actual values:
{API_KEY}: Your API key was provided with your license at the time of registration. If you're not sure where to find the API key, click here(opens new window).
{PID}: This is the process ID of your Java application running inside container. Not sure how to find process Id? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process in container. What is Unique Token?
{JAVA_HOME}: The directory path where Java is installed in your container. To determine the Java installation path inside a Docker container, you can run the following command:
dockerexec{container_id}whichjava
1
1. Create a Dockerfile: Create a new Dockerfile with the below code:
FROM adoptopenjdk/openjdk11:debian
# Install packages required by ycrash to capture system diagnosis
RUN apt-get update \&&apt-get upgrade -y\&&apt-getinstall-yunzip procps net-tools \&&rm-rf /var/lib/apt/lists/*
# Setup yc-360 script
RUN mkdir-p /opt/workspace/yc-360-script
RUN cd /opt/workspace/yc-360-script \&&curl-fsSL https://tier1app.com/dist/ycrash/yc-360-latest.zip -o yc-360-latest.zip \&&unzip yc-360-latest.zip \&&rm yc-360-latest.zip \&&chmod +x /opt/workspace/yc-360-script/linux/yc
WORKDIR /opt/workspace/yc-360-script/linux
# yc-360 script
EXPOSE 8085
ENTRYPOINT ["/bin/bash"]
{PID}: This is the process ID of your Java application running inside container. Not sure how to find process Id? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process in container. What is Unique Token?
{JAVA_HOME}: The directory path where Java is installed in your container. To determine the Java installation path inside a Docker container, you can run the following command:
dockerexec{container_id}whichjava
1
{APPLICATION_NAME}: Friendly name for the application (displayed in the yCrash dashboard).
1. Create the Dockerfile: Create a new Dockerfile with the below code:
FROM adoptopenjdk/openjdk11:debian
# Install packages required by ycrash to capture system diagnosis
RUN apt-get update \&&apt-get upgrade -y\&&apt-getinstall-yunzip procps net-tools \&&rm-rf /var/lib/apt/lists/*
# Setup yc-360 script
RUN mkdir-p /opt/workspace/yc-360-script
RUN cd /opt/workspace/yc-360-script \&&curl-fsSL https://tier1app.com/dist/ycrash/yc-360-latest.zip -o yc-360-latest.zip \&&unzip yc-360-latest.zip \&&rm yc-360-latest.zip \&&chmod +x /opt/workspace/yc-360-script/linux/yc
WORKDIR /opt/workspace/yc-360-script/linux
# yc-360 script
EXPOSE 8085
ENTRYPOINT ["/bin/bash"]
Replace the placeholders in the YAML configuration file with your actual values:
{API_KEY}: Your API key was provided with your license at the time of registration. If you're not sure where to find the API key, click here(opens new window).
{TOKEN_TO_IDENTIFY_PROCESS}: A unique keyword to identify your Java process. To learn more about this argument, see How the processToken Argument Works section.
{APPLICATION_NAME}: Friendly name for the application (shown in the yCrash dashboard).
{PID}: This is the process ID of your Java application running inside container. Not sure how to find process Id? Learn here. Alternatively, you can pass Unique Token that will uniquely identify the process in container. What is Unique Token?
{JAVA_HOME}: The directory path where Java is installed in your container. To determine the Java installation path inside a Docker container, you can run the following command:
dockerexec{container_id}whichjava
1
IMPORTANT NOTE
The yc-360 script must be executed with the same user privileges as the Java application. For example, if the application runs under the tomcat-user user, yc-360 script must also be executed by tomcat-user user.
To detect memory-related issues, GC logging must be enabled for your application. You can enable GC logging by using the JVM arguments listed here.
The yc-360 script doesn't capture heap dump by default. Pass -hd argument to capture heap dump. For more information, please visit How to Capture Heap Dump?
If you get an error while running yc-360 script in Alpine docker container, please install a libec6-compat package in your Alpine docker container. For example,