retrievercommunications / docker-jasperserver

Docker image for the community edition of JasperReports® Server.
https://hub.docker.com/r/retriever/jasperserver/
MIT License
46 stars 50 forks source link

export.zip #2

Closed pkraus109 closed 7 years ago

pkraus109 commented 8 years ago

Fantastic container. Everything just worked export the export.zip import. I know i am just doing something wrong. Looking at the bootstrap script it looks like on the first run it checks to see if folder exists and then if not creates database and checks the jasperserver-imports folder for zip archives.

So to make sure everything was cleaned on my test db i just removed /var/lib/docker for 100% fresh take on everything.

I then run your docker mysql run command and that comes up great.

I then do ...

docker run --volume jasperserver-import:/jasperserver-import --rm --name jasperserver -e DB_TYPE=mysql -e DB_HOST=db -e DB_PORT=3306 -e DB_USER=root -e DB_PASSWORD=mysql --link jasperserver_mysql:db -p 8080:8080 retriever/jasperserver (putting this into foreground mode so i could watch the boot strap).

I run this from the parent directory of jasperserver-import.

It bootstraps, it runs, its accessible but the export.zip file in ./jasperserver-import doesn't get imported.

I have attached the output from the bootstrap process.

jasperserver_bootstrap.txt

Thanks!!

grange74 commented 8 years ago

I could reproduce this issue with your command. The problem i believe is the --volume jasperserver-import:/jasperserver-import. From re-reading the docker documentation on --volume, it seems the first argument must be absolute path otherwise it considers it as a name.

The host-src can either be an absolute path or a name value. If you supply an absolute path for the host-dir, Docker bind-mounts to the path you specify. If you supply a name, Docker creates a named volume by that name.

So please try recreating the container and specify the absolute path. It worked for me.

docker run --volume /absolute/path/to/jasperserver-import:/jasperserver-import --rm --name jasperserver -e DB_TYPE=mysql -e DB_HOST=db -e DB_PORT=3306 -e DB_USER=root -e DB_PASSWORD=mysql --link jasperserver_mysql:db -p 8080:8080 retriever/jasperserver

If this works, i'll update the README to be clearer on this and include an example command.

Most of the time i run using docker-compose and that works fine. Strangely that accepts a relative path using "./jasperserver-import" but that doesn't seem to be acceptable from the command line.

grange74 commented 7 years ago

As there hasn't been any activity on this in over 6 months, i'm going to assume the suggestion fixed the problem.