专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

agross/youtrack Docker 镜像 - 轩辕镜像

youtrack
agross/youtrack
自动构建
JetBrains YouTrack as a docker container
3 收藏0 次下载
🚀 稳定镜像源 = 更少宕机 + 更低运维成本
镜像简介版本下载
🚀 稳定镜像源 = 更少宕机 + 更低运维成本

docker-youtrack

This Dockerfile allows you to build images to deploy your own YouTrack instance. It has been tested on Fedora 23 and CentOS 7.

Please remember to back up your data directories often, especially before upgrading to a newer version.

Test it

  1. Install docker.
  2. Run the container. (Stop with CTRL-C.)
sh
docker run -it -p 8080:8080 agross/youtrack
  1. Open your browser and navigate to http://localhost:8080.

Run it as service on systemd

  1. Decide where to put YouTrack data and logs. Set domain name/server name and the public port.
sh
YOUTRACK_DATA="/var/data/youtrack"
YOUTRACK_LOGS="/var/log/youtrack"

DOMAIN=example.com
PORT=8012
  1. Create directories to store data and logs outside of the container.
sh
mkdir --parents "$YOUTRACK_DATA/backups" \
                "$YOUTRACK_DATA/conf" \
                "$YOUTRACK_DATA/data" \
                "$YOUTRACK_LOGS"
  1. Set permissions.

The Dockerfile creates a youtrack user and group. This user has a UID and GID of 5000. Make sure to add a user to your host system with this UID and GID and allow this user to read and write to $YOUTRACK_DATA and $YOUTRACK_LOGS. The name of the host user and group in not important.

sh
# Create youtrack group and user in docker host, e.g.:
groupadd --gid 5000 --system youtrack
useradd --uid 5000 --gid 5000 --system --shell /sbin/nologin --comment "JetBrains YouTrack" youtrack

# 5000 is the ID of the youtrack user and group created by the Dockerfile.
chown -R 5000:5000 "$YOUTRACK_DATA" "$YOUTRACK_LOGS"
  1. Create your container.

Note: The :z option on the volume mounts makes sure the SELinux context of the directories are set appropriately.

/etc/localtime needs to be bind-mounted to use the same time zone as your docker host.

sh
docker create -it -p $PORT:8080 \
                  -v /etc/localtime:/etc/localtime:ro \
                  -v "$YOUTRACK_DATA/backups:/youtrack/backups:z" \
                  -v "$YOUTRACK_DATA/conf:/youtrack/conf:z" \
                  -v "$YOUTRACK_DATA/data:/youtrack/data:z" \
                  -v "$YOUTRACK_LOGS:/youtrack/logs:z" \
                  --name youtrack \
                  agross/youtrack
  1. Create systemd unit, e.g. /etc/systemd/system/youtrack.service.
sh
cat <<EOF > "/etc/systemd/system/youtrack.service"
[Unit]
Description=JetBrains YouTrack
Requires=docker.service
After=docker.service

[Service]
Restart=always
# When docker stop is executed, the docker-entrypoint.sh trap + wait combination
# will generate an exit status of 143 = 128 + 15 (SIGTERM).
# More information: [***]
SuccessExitStatus=143
PrivateTmp=true
ExecStart=/usr/bin/docker start --attach=true youtrack
ExecStop=/usr/bin/docker stop --time=60 youtrack

[Install]
WantedBy=multi-user.target
EOF

systemctl enable youtrack.service
systemctl start youtrack.service
  1. Setup logrotate, e.g. /etc/logrotate.d/youtrack.
sh
cat <<EOF > "/etc/logrotate.d/youtrack"
$YOUTRACK_LOGS/*.log
$YOUTRACK_LOGS/hub/*.log
$YOUTRACK_LOGS/hub/logs/*.log
$YOUTRACK_LOGS/youtrack/*.log
$YOUTRACK_LOGS/youtrack/logs/*.log
$YOUTRACK_LOGS/internal/services/bundleProcess/*.log
{
  rotate 7
  daily
  dateext
  missingok
  notifempty
  sharedscripts
  copytruncate
  compress
}
EOF
  1. Add nginx configuration, e.g. /etc/nginx/conf.d/youtrack.conf.
sh
cat <<EOF > "/etc/nginx/conf.d/youtrack.conf"
upstream youtrack {
  server localhost:$PORT;
}

server {
  listen           80;
  listen      [::]:80;

  server_name $DOMAIN;

  access_log  /var/log/nginx/$DOMAIN.access.log;
  error_log   /var/log/nginx/$DOMAIN.error.log;

  # Do not limit upload.
  client_max_body_size 0;

  # Required to avoid HTTP 411: see issue #1486 ([***]
  chunked_transfer_encoding on;

  location / {
    proxy_pass         [***]

    proxy_set_header   Host              \$host;
    proxy_set_header   X-Real-IP         \$remote_addr;
    proxy_set_header   X-Forwarded-Host  \$http_host;
    proxy_set_header   X-Forwarded-For   \$proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto \$scheme;
    proxy_http_version 1.1;
  }

  location /api/eventSourceBus {
    proxy_pass         [***]

    proxy_set_header   Host              \$host;
    proxy_set_header   X-Real-IP         \$remote_addr;
    proxy_set_header   X-Forwarded-Host  \$http_host;
    proxy_set_header   X-Forwarded-For   \$proxy_add_x_forwarded_for;
    proxy_set_header   X-Forwarded-Proto \$scheme;
    proxy_http_version 1.1;

    proxy_cache        off;
    proxy_buffering    off;
    proxy_read_timeout 86400s;
    proxy_send_timeout 86400s;
    proxy_set_header   Connection        '';
    chunked_transfer_encoding off;
  }
}
EOF

nginx -s reload

Make sure SELinux policy allows nginx to access port $PORT (the first part of -p $PORT:8080 of step 3).

sh
if [ $(semanage port --list | grep --count "^http_port_t.*$PORT") -eq 0 ]; then
  if semanage port --add --type http_port_t --proto tcp $PORT; then
    echo Added port $PORT as a valid port for nginx:
    semanage port --list | grep ^http_port_t
  else
    >&2 echo Could not add port $PORT as a valid port for nginx. Please add it yourself. More information: [***]
  fi
else
  echo Port $PORT is already a valid port for nginx:
  semanage port --list | grep ^http_port_t
fi
  1. Configure YouTrack.

Follow the steps of the installation instructions for JetBrains YouTrack using paths inside the docker container located under

  • /youtrack/backups,
  • /youtrack/data,
  • /youtrack/logs and
  • /youtrack/temp.
  1. Update to a newer version.
sh
docker pull agross/youtrack

systemctl stop youtrack.service

# Back up $YOUTRACK_DATA.
tar -zcvf "youtrack-data-$(date +%F-%H-%M-%S).tar.gz" "$YOUTRACK_DATA"

docker rm youtrack

# Repeat step 4 and create a new image.
docker create ...

systemctl start youtrack.service

Building and testing the Dockerfile

  1. Build the Dockerfile.
sh
docker build --tag agross/youtrack:testing .

docker images
# Should contain:
# REPOSITORY                        TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
# agross/youtrack                   testing             0dcb8bf6093f        49 seconds ago      405.4 MB

  1. Prepare directories for testing.
sh
TEST_DIR="/tmp/youtrack-testing"

mkdir --parents "$TEST_DIR/backups" \
                "$TEST_DIR/conf" \
                "$TEST_DIR/data" \
                "$TEST_DIR/logs"
chown -R 5000:5000 "$TEST_DIR"
  1. Run the container built in step 1.

Note: The :z option on the volume mounts makes sure the SELinux context of the directories are set appropriately.

sh
docker run -it --rm \
               --name youtrack-testing \
               -p 8080:8080 \
               -v "$TEST_DIR/backups:/youtrack/backups:z" \
               -v "$TEST_DIR/conf:/youtrack/conf:z" \
               -v "$TEST_DIR/data:/youtrack/data:z" \
               -v "$TEST_DIR/logs:/youtrack/logs:z" \
               agross/youtrack:testing
  1. Open a shell to your running container.
sh
docker exec -it youtrack-testing bash
  1. Run bash instead of starting YouTrack.

Note: The :z option on the volume mounts makes sure the SELinux context of the directories are set appropriately.

sh
docker run -it -v "$TEST_DIR/backups:/youtrack/backups:z" \
               -v "$TEST_DIR/conf:/youtrack/conf:z" \
               -v "$TEST_DIR/data:/youtrack/data:z" \
               -v "$TEST_DIR/logs:/youtrack/logs:z" \
               agross/youtrack:testing bash

Without mounted data directories:

sh
docker run -it agross/youtrack:testing bash
  1. Clean up after yourself.
sh
docker ps -aq --no-trunc --filter ancestor=agross/youtrack:testing | xargs --no-run-if-empty docker rm
docker images -q --no-trunc agross/youtrack:testing | xargs --no-run-if-empty docker rmi
rm -rf "$TEST_DIR"
查看更多 youtrack 相关镜像 →
agross/nginx-brotli logo
agross/nginx-brotli
暂无描述
100K+ pulls
上次更新:未知
agross/teamcity logo
agross/teamcity
JetBrains TeamCity Server as a docker container
150K+ pulls
上次更新:未知
agross/hub logo
agross/hub
JetBrains Hub as a docker container
110K+ pulls
上次更新:未知

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

登录仓库拉取

通过 Docker 登录认证访问私有仓库

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

Docker Compose

Docker Compose 项目配置

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

MacOS OrbStack

MacOS OrbStack 容器配置

宝塔面板

在宝塔面板一键配置镜像

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

极空间

极空间 NAS 系统配置服务

爱快路由

爱快 iKuai 路由系统配置

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

专属域名拉取

无需登录使用专属域名

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

轩辕镜像免费版与专业版有什么区别?

免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。

轩辕镜像支持哪些镜像仓库?

专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。

流量耗尽错误提示

当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。

410 错误问题

通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。

manifest unknown 错误

先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。

镜像拉取成功后,如何去掉轩辕镜像域名前缀?

使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
agross/youtrack
官方博客Docker 镜像使用技巧与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
咨询镜像拉取问题请 提交工单,官方技术交流群:1072982923
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
咨询镜像拉取问题请提交工单,官方技术交流群:
轩辕镜像面向开发者与科研用户,提供开源镜像的搜索和访问支持。所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
官方邮箱:点击复制邮箱
©2024-2026 源码跳动
官方邮箱:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.