# Run yCrash Server in Docker Container

# Run the official Docker image

You can pull the latest official Docker image from the docker hub (opens new window) page and run the yCrash server in a Docker container.

Run the following command to run the official Docker image of yc-server

docker run -p 8080:8080 \
   --name yc-server \
   -v $(pwd)/license.lic:/opt/workspace/yc/license.lic \   
   ycrash/ycrash:latest
1
2
3
4

Note: Before running the above command give the path where your licence.lic file is located. In the above example, we are mounting the current directory, from where you are executing this command.

# Run your own Docker image

If you wish to build your own Docker image for yCrash server then follow the below instructions:

  1. Create a new Docker file. You can get the latest version of yCrash server from the releases page. Here is a sample docker file.
FROM adoptopenjdk/openjdk8:debian-slim

RUN apt-get update \
  && apt-get upgrade -y \
  && apt-get install -y gpg unzip tini \
  && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /opt/workspace/yc
WORKDIR /opt/workspace/yc

# Get the latest version of yCrash server from /ycrash-downloads/download.html
RUN curl -fsSL https://tier1app.com/dist/ycrash/yc-latest.zip -o yc-latest.zip && unzip yc-latest.zip && rm yc-latest.zip

EXPOSE 8080

ENTRYPOINT ["/usr/bin/tini", "--", "java", "-Xms2g", "-Xmx4g", "-Dapp=yc", "-DlogDir=/opt/workspace/yc/logs", "-DuploadDir=/opt/workspace/yc/uploads", "-jar", "webapp-runner.jar", "-AconnectionTimeout=3600000", "--port", "8080", "yc.war"]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  1. Build Docker image
docker build -t yc-server ./Docker-image-path
1
  1. Run Docker Container
docker run -p 8080:8080 \
   --name yc-server \
   -v $(pwd)/license.lic:/opt/workspace/yc/license.lic \   
	yc-server
1
2
3
4

Note: Before running the docker give the path where your licence.lic file is located. In the above example, we are mounting the current directory, from where you are executing this command.