Brief description

Sentry official website: sentry. IO

  1. Sentry privatized deployment of official Docker containers
  2. Docker & Docker Compose is used for Sentry’s recommended self-hosting platform.
  3. Docker Desktop is required for Windows. Docker & Docker Compose
  4. Installing Sentry with Docker on Windows requires WSL 2 support.

Note for WSL 2 if you are running Windows 10 version 1903 or 1909, open Settings in the Windows menu, navigate to Updates and Security, and select Check for Updates. The internal version number must be 18362.1049+ or 18363.1049+. The minor internal version number must be later than.1049. Read more: WSL 2 will soon support Windows 10 versions 1903 and 1909.

If the system version does not meet the requirements, download the manual patch from the Microsoft official website.

Reference:

  • WSL is installed manually
  • WSL installation

wsl & linux

After the WSL 2 upgrade is complete, download Ubuntu 18.04 TLS from the Microsoft Store and run the following command.

Convert Ubuntu 18.04 to WSL 2 kernel for execution. WSL - set - the version of Ubuntu 18.04 2Copy the code

Normal Installation Procedure

1. Install the Sentry Docker image container

After entering WSL, there are two ways for installation. The installation needs to clone the official Docker container, and you can choose according to your preference.

  1. Git Clone container in Ubuntu.
  2. In the Windows Git Clone container.

1.1. Ubuntu clone

After clone is complete, go to the root directory of the project folder and run./install.sh

1.2. Windows clone

By default, WSL mounts the Windows folder system in the root/MNT directory. Go to the root of the Clone project folder and run./install.sh

2. Create an account and password

If the network is good, the container will be installed soon, and the following message will be displayed.

Do you need to create your account now? Default: Would you like to create a user account now? [Y/n]: # input password Email: # input password is not visible, so pay attention to case. The input will be reconfirmed after completion. Password:Copy the code

3. The creation is complete

After the account information is entered, wait for the account to be generated and you can see that the installation has been completed in Docker Desktop.

The execution is prompted to start the Docker service. Docker compose up -d

Note: If the execution fails, add sudo to grant permission to execute.

-----------------------------------------------------------------

You're all done! Run the following command to get Sentry running:

  docker compose up -d

-----------------------------------------------------------------
Copy the code

Note: When the container diagram is red/orange you need to see if the services are all started.

4. Go to the Sentry management page

After all the container services are started, find the following services and open them to enter the Sentry management page.

Sentry manages the page

Enter the account password created in Step 2 to log in to the system as an administrator.


Ok. Now that the Sentry private deployment is up and running, all that remains is to configure the project according to the configuration in the official documentation.


Error logging

1. An error occurred, caught SIGERR on line 8

The following error message is displayed when you run the image docker./install.sh provided by Sentry.

▶ Parsing command line... ▶ Initializing Docker Compose... ▶ Setting up error handling... ▶ Checking for latest Commit... B. Deflected. ▶ Checking minimum requirements... An error occurred, caught SIGERR on line 8 Cleaning up...Copy the code

Check whether docker is installed and whether the service is started first. If no, run the following command.

Sudo apt-get -y install apt-transport-https ca-certificates curl # 2. Get docker PGP keys curl - fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt - key add - # 3. Set the docker installation source sudo add apt - repository "deb [arch = amd64] https://download.docker.com/linux/ubuntu $(lsb_release - cs) stable" # 4. Sudo apt-get Update # 5. Sudo apt-get -y install docker-ce-cliCopy the code

If yes, continue to execute./install.sh. The following error information is displayed.

▶ Parsing command line... ▶ Initializing Docker Compose... ▶ Setting up error handling... ▶ Checking for latest Commit... B. Deflected. ▶ Checking minimum requirements... Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? An error occurred, caught SIGERR on line 8 Cleaning up...Copy the code

Execute the add prompt content, which is the docker environment variable.

vi ~/.bashrc

#Move to the last line and write the following information
export DOCKER_HOST='unix:///var/run/docker.sock'
Copy the code

2. docker: unrecognized service

The following error message is displayed when the docker service is restarted using sudo service docker restart.

docker: unrecognized service
Copy the code

If the Docker client is installed and environment variables are configured, run the following command.

sudo docker ps
Copy the code

Executed as the always connect to the daemon at Docker Unix: / / / var/run/Docker. The sock. All the Docker daemon running? If an error message is displayed, you need to open Docker Desktop -> Settings and confirm that the following options are enabled. If not, manually enable them.

Run the Apply & Restart command

sudo docker ps

#Prompt information
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
Copy the code

Run the./install.sh command again and the following error information is displayed:

▶ Parsing command line... ▶ Initializing Docker Compose... ▶ Setting up error handling... ▶ Checking for latest Commit... B. Deflected. ▶ Checking minimum requirements... Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/version" : dial Unix/var/run/docker. The sock: connect: permission denied An error occurred, caught SIGERR on line 8 Cleaning up...Copy the code

Sudo./install.sh: sudo.


Copyright: This article belongs to the author Lin Xiaoshuai, shall not be reproduced without authorization and second modification. Reprint or cooperation, please leave a message and contact information below.