如何在没有权限问题的马拉松上部署artifactory-oss的docker镜像

时间:2017-04-15 20:00:18

标签: java linux docker artifactory marathon

我正在尝试部署artifactory-oss

的docker容器

这是我在本地用来测试它的docker-compose.yml

version: '2'
services:
  artifactory:
    image: jfrog-docker-registry.bintray.io/jfrog/artifactory-oss:4.1.3
    ports:
      - "8081:8081"
    volumes:
      - "/var/opt/jfrog/artifactory"

我试图用马拉松在mesos上部署它。

我有权限问题:

I0415 19:43:01.747540 15616 fetcher.cpp:424] Fetcher Info: {"cache_directory":"\/tmp\/mesos\/fetch\/slaves\/4e00de0a-3293-453f-83ab-9576653867d7-S0","items":[{"action":"BYPASS_CACHE","uri":{"cache":false,"executable":false,"extract":true,"value":"file:\/\/\/etc\/docker.tar.gz"}}],"sandbox_directory":"\/tmp\/mesos\/slaves\/4e00de0a-3293-453f-83ab-9576653867d7-S0\/frameworks\/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000\/executors\/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111\/runs\/f412d99e-34f4-459f-8533-4e58c2e8dd59"}
I0415 19:43:01.749455 15616 fetcher.cpp:379] Fetching URI 'file:///etc/docker.tar.gz'
I0415 19:43:01.749469 15616 fetcher.cpp:250] Fetching directly into the sandbox directory
I0415 19:43:01.749485 15616 fetcher.cpp:187] Fetching URI 'file:///etc/docker.tar.gz'
I0415 19:43:01.749500 15616 fetcher.cpp:167] Copying resource with command:cp '/etc/docker.tar.gz' '/tmp/mesos/slaves/4e00de0a-3293-453f-83ab-9576653867d7-S0/frameworks/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000/executors/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111/runs/f412d99e-34f4-459f-8533-4e58c2e8dd59/docker.tar.gz'
I0415 19:43:01.752964 15616 fetcher.cpp:84] Extracting with command: tar -C '/tmp/mesos/slaves/4e00de0a-3293-453f-83ab-9576653867d7-S0/frameworks/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000/executors/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111/runs/f412d99e-34f4-459f-8533-4e58c2e8dd59' -xf '/tmp/mesos/slaves/4e00de0a-3293-453f-83ab-9576653867d7-S0/frameworks/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000/executors/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111/runs/f412d99e-34f4-459f-8533-4e58c2e8dd59/docker.tar.gz'
I0415 19:43:01.758829 15616 fetcher.cpp:92] Extracted '/tmp/mesos/slaves/4e00de0a-3293-453f-83ab-9576653867d7-S0/frameworks/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000/executors/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111/runs/f412d99e-34f4-459f-8533-4e58c2e8dd59/docker.tar.gz' into '/tmp/mesos/slaves/4e00de0a-3293-453f-83ab-9576653867d7-S0/frameworks/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000/executors/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111/runs/f412d99e-34f4-459f-8533-4e58c2e8dd59'
I0415 19:43:01.758857 15616 fetcher.cpp:456] Fetched 'file:///etc/docker.tar.gz' to '/tmp/mesos/slaves/4e00de0a-3293-453f-83ab-9576653867d7-S0/frameworks/21d4cb5a-ac85-4a3c-90fd-b8ab6d37ecc0-0000/executors/kopaxgroup_developers_artifactory.f7cf24d5-2213-11e7-a891-c60d6e82d111/runs/f412d99e-34f4-459f-8533-4e58c2e8dd59/docker.tar.gz'
I0415 19:43:12.658823 15681 exec.cpp:143] Version: 0.28.1
I0415 19:43:12.679823 15695 exec.cpp:217] Executor registered on slave 4e00de0a-3293-453f-83ab-9576653867d7-S0
nginx: unrecognized service
mkdir: cannot create directory `/var/opt/jfrog/artifactory/logs': Permission denied
mkdir: cannot create directory `': No such file or directory
mkdir: cannot create directory `/var/opt/jfrog/artifactory/temp': Permission denied
mkdir: cannot create directory `/var/opt/jfrog/artifactory/work': Permission denied
touch: cannot touch `/opt/jfrog/artifactory/tomcat/logs/catalina.out': No such file or directory
/opt/jfrog/artifactory/tomcat/bin/catalina.sh: line 401: /opt/jfrog/artifactory/tomcat/logs/catalina.out: No such file or directory

显然我并不孤单https://serverfault.com/questions/838926/docker-cannot-create-directory-opt-jfrog-artifactory-logs-permission-denied

Dockerfile在任何地方都无法查看,有没有人知道我能解决这个问题?

编辑:我设法使用此image。它是旧版本的旧版GUI。对于v4,这个问题仍然没有答案

0 个答案:

没有答案