teamatldocker / jira

Dockerized Atlassian Jira
https://hub.docker.com/r/teamatldocker/jira/
MIT License
445 stars 225 forks source link

Restore backup using this image #123

Closed doasare closed 5 years ago

doasare commented 5 years ago

I have a backup and want to import it using this image but get file not found. I checked the image in docker interactive console with user jira and the file exists. This is my extended docker image. Any help? ` FROM blacklabelops/jira

USER root

RUN mkdir -p /var/atlassian/jira/ ADD 26_02_2019_Jira.zip /var/atlassian/jira/import/ RUN chown -R jira:jira /var/atlassian/jira RUN chmod -R 755 /var/atlassian/jira

USER jira CMD ["jira"]

`

blacklabelops commented 5 years ago

Won't work, because /var/atlassian is a volume.

You need to start the container and then use docker cp ... to copy your file to the volume.

Afterwards use docker execute ... to set permissions on file.

doasare commented 5 years ago

Thanks, i am actually very close. docker cp <file> <container>:<dir> allowed me to copy

any idea how to run the exec command. I've attempted a this way with no luck. docker exec -w /root -it jira chmod 755 /var/atlassian/jira/import/26_02_2019_Jira.zip getting following error The file at /var/atlassian/jira/import/26_02_2019_Jira.zip was not readable by the Jira process. Please check the file's permissions.

blacklabelops commented 5 years ago

Should be:

docker exec -u root jira chmod 755 /var/atlassian/jira/import/26_02_2019_Jira.zip

doasare commented 5 years ago

Thanks that worked. I had to run these two commands first. sudo docker exec -i -t jira /bin/bash chmod 777 .