Giter Site home page Giter Site logo

docker-compose up about jira HOT 9 CLOSED

teamatldocker avatar teamatldocker commented on August 22, 2024
docker-compose up

from jira.

Comments (9)

blacklabelops avatar blacklabelops commented on August 22, 2024

This usually happens when you volume folders from windows.

Which operating system do you use?

Do you use volumes? Which folders?

You can try to start container under user root!

from jira.

yudong2015 avatar yudong2015 commented on August 22, 2024

The OS is ubuntu14. I have used volumes . My docker-compose is:

version: '2'

services:
  jira:
    image: blacklabelops/jira
    container_name: jirasoftware
    networks:
    ┊ - jiranet
    volumes:
    ┊ - /data/volumes/jira/jiradata:/var/atlassian/jira
    ports:
    ┊ - '8092:8080'
    environment:
    ┊ - 'JIRA_DATABASE_URL=postgresql://jira@postgresql/jiradb'
    ┊ - 'JIRA_DB_PASSWORD=jellyfish'
    ┊ - 'CATALINA_OPTS= -Xms256m -Xmx1g'
    ┊ - 'JIRA_PROXY_NAME='
    ┊ - 'JIRA_PROXY_PORT='
    ┊ - 'JIRA_PROXY_SCHEME='
    ┊ - 'JIRA_DELAYED_START=10'
    links:
    ┊ - 'postgresql:postgresql'
    labels:
    ┊ com.blacklabelops.description: "Atlassian Jira"
    ┊ com.blacklabelops.service: "jira"

  postgresql:
    image: blacklabelops/postgres
    hostname: postgresql
    networks:
    ┊ - jiranet
    volumes:
    ┊ - /data/volumes/jira/postgresql:/var/lib/postgresql/data
    environment:
    ┊ - 'POSTGRES_USER=jira'# CHANGE THE PASSWORD!
    ┊ - 'POSTGRES_PASSWORD=jellyfish'
    ┊ - 'POSTGRES_DB=jiradb'
    ┊ - 'POSTGRES_ENCODING=UNICODE'
    ┊ - 'POSTGRES_COLLATE=C'
    ┊ - 'POSTGRES_COLLATE_TYPE=C'
    labels:
    ┊ com.blacklabelops.description: "PostgreSQL Database Server"
    ┊ com.blacklabelops.service: "postgresql"

#volumes:
#jiradata:
#  external: false
#  postgresqldata:
#  external: false
# 

networks:
  jiranet:
    driver: bridge

And I also try it under user root , bun it does not work. I think that is error in container , the user in container is not root.

from jira.

blacklabelops avatar blacklabelops commented on August 22, 2024

The problem: User inside container (jira:jira userid=1000, groupid=1000) has no access to your local Ubuntu folder /data/volumes/jira/jiradata.

There are several solutions, the easiest is to run the container with user root:

services:
  jira:
    image: blacklabelops/jira
    container_name: jirasoftware
    user: root

from jira.

yudong2015 avatar yudong2015 commented on August 22, 2024

It does not work
1 pic_hd

Other solutions?
Do you have try it on ubuntu?

from jira.

blacklabelops avatar blacklabelops commented on August 22, 2024
  • Add some random user with user_id 1000 and group_id 1000 to your ubuntu system. Give user own rights to folder /data/volumes/jira/jiradata.

from jira.

blacklabelops avatar blacklabelops commented on August 22, 2024

I am not sure if docker volumes solves this issue. I would expect the same permission issue because docker saves volumes on your disk.

Add this to you docker-compose file:

volumes:
  jiradata:
    external: false

Then configure your container to use the volume rather the folder:

services:
  jira:
    image: blacklabelops/jira
    container_name: jirasoftware
    volumes:
      - jiradata:/var/atlassian/jira

You can see where the volume is saved on your hard disk:

$ docker volume inspect jiradata

from jira.

blacklabelops avatar blacklabelops commented on August 22, 2024

Third solution:

Check out this project then adjust

export CONTAINER_UID=1000                       &&  \

and

export CONTAINER_GID=1000                       &&  \

To some user_id and group_id of your ubuntu system.

Build container like this:

$ docker build -t blacklabelops/jira .

Give user own rights to folder /data/volumes/jira/jiradata.

from jira.

blacklabelops avatar blacklabelops commented on August 22, 2024

Closing.

from jira.

rwarren avatar rwarren commented on August 22, 2024

For anyone else landing here and still needing help, docker volumes (mentioned above) DO solve the issue.

Automatically created volumes in the docker-compose file (or created externally with docker volume create jiradata and referenced in the compose file with external: true) issue get created with permissions that can be accessed from the container.

from jira.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.