Coder Social home page Coder Social logo

docker_i-librarian's Introduction

This is a Dockerfile for I, Librarian. Please, Look at the following instructions.

Prerequisites

If you do not already have an I, Librarian database, you must create a blank library folder ${DATA_PATH} to initiate the library on the host before to run the container, and set up its ownership correctly.

mkdir ${DATA_PATH}
sudo chown 33:33 ${DATA_PATH}

Run the container

On the command line

sudo docker run -d -p 8080:80 \
            -v ${DATA_PATH}:/app/data \
            -v /etc/localtime:/etc/localtime:ro \
            --name=i-librarian \
            cgrima/i-librarian

Docker-compose

Create your docker-compose.yml file such as

version: "2"

services:

  app:
    image: cgrima/i-librarian
    privileged: true
    ports:
      - "8080:80"
    volumes:
      - ${DATA_PATH}:/app/data
      - /etc/localtime:/etc/localtime:ro

Then, start docker-compose

docker-compose up -d

Access your I-librarian instance

Open http://localhost:8080 on your web browser and follow instructions.

Migration from I, Librarian 4.10 to 5.*

Note: The 4.10 database folder was called library. It is called data in 5.*.

  1. Stop your 4.10 I, Librarian container, i.e. docker-compose stop i-librarian
  2. Backup your 4.10 library/ folder.
  3. Remove your 4.10 I, Librarian container, i.e. docker-compose rm i-librarian.
  4. Rebuild the I, Librarian image from latest source, i.e. docker-copomse up -d.
  5. Build and Launch your new 5.* I, Librarian container following one of the statements above but add you former 4.10 database folder as volume, i.e. -v ${LIBRARY_PATH}:/app/library.
  6. Connect to http://localhost:8080 and follow the migration instructions (the library folder to migrate is /app/library).

Update

Simply stop, remove, and launch your container again. With docker-compose:

docker-compose down
docker-compose up -d

Troubleshoot

If you have rights/permissions issues with the library folder try to add the --privileged=true option to the docker run command.

docker_i-librarian's People

Contributors

cgrima avatar tux1337 avatar nicolasshu avatar

Stargazers

Thiemo Gamma avatar Kamil Essekkat avatar  avatar Kriskras99 avatar  avatar Domi avatar James Lester avatar Thomas avatar Nirmal avatar  avatar  avatar  avatar  avatar Tomaz Vaupotic avatar Wen Zhang avatar  avatar CodeS1ave avatar William King avatar Ruby avatar  avatar Jorge avatar  avatar Mohamed Elashri avatar John Stitt avatar  avatar Mirza Arnaut avatar Darryn Jones avatar  avatar Tyrion Liu avatar bit-chemist avatar Paul Alexis Chando avatar  avatar Guy Marcus avatar Peixian Wang avatar StudioEtrange avatar Fabien Dubosson avatar

Watchers

 avatar James Cloos avatar Kriskras99 avatar FRS Packager avatar

docker_i-librarian's Issues

Unable to access instance?

Hi,

I can only see "It works" showed up on my webpage after installing and don't know what to do next.
Any help please?

Thanks,

Prerequisite-Instructions are obsolete

I am referring to this:

wget -O i-librarian.tar.xz http://i-librarian.net/downloads/I,-Librarian-4.8-Linux.tar.xz
unxz i-librarian.tar.xz && tar -xvf i-librarian.tar library && rm i-librarian.tar
sudo chown -R www-data:www-data library
sudo chown root:root library/.htaccess

The URL leads to a 404 page. I suppose the files were move to GitHub.

UID/GID environment variables

Allow the user to set the UID/GID for the i-librarian user. Would avoid to have to manually set them to 33:33 on the library folder.

docker installation error

Hi,

  1. as per your instructions, I have created a data folder on the host computer, given access rights as www-data (33)
  2. completed the docker-compose.yml file with the name of the container (but that should not be an issue): ilb
  3. When I docker-compose up or use Portainer, I consistently get this error:
Creating ilb ... error
ERROR: for ilb  Cannot start service app: OCI runtime create failed: container_linux.go:380: starting container process caused: apply caps: operation not permitted: unknown

Please help.

500 Internal Server Error

Hello,
I tried to rebuild this image on my raspberry pi 4 because it´s originally made on amd64 and not worked on the arm.
The server starts well and I am able to make users and upload pdf, but when i tried to open some file I am getting error:

Argument` 3 passed to Librarian\Security\Validation::intRange() must be of the type int, float given, called in /app/classes/security/validation.php on line 289.
Any idea what can be wrong? And why it happened only on arm build?
The installation log file is too big to upload into Pastebin. Any idea where I can upload the file to share with others to analyze?

PDF do not load after Update to 5.9.1 or 5.9.2

I updated two instances of iLibrarian and both of them are unable to display the PDFs in the inbuilt preview.
Looking up in the developer console, an error is presented which states:
Failed to load resource: the server responded with a status of 500 ()

The docker logs are only listing requests to the cite, which are not helpful in debuging this Problem. Reverting back to 5.9.0, which I had previously, does not help. Downloading the PDFs works fine, so it seems they are not broken.
I have set privileged=true, so that shouldn't be a problem.

I have seen that the problem should have been solved with the fix proposed by @nicolasshu in #10 , but sadly my instance is still "broken". Is there a way to fix this?

Libreoffice dependencies

The Dockerfile installs the whole Libreoffice package to provide compression tools for i-librarian. The container works perfectly fine that way but that also makes it pretty heavy (~1.1Go). Might want to find the specific Libreoffice librairies that are needed in order to lighten the Docker container.

Provide tags on Docker Hub

Hi,

Thanks for sharing this container.

Do you mind to provide tags on the Docker Hub? There is only latest yet, could be nice to have versions, like 3.4.1, for installing a specific version.

arm support

After running docker compose up -d I receive the following output in my raspberry pi 5
! app The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

Is it possible to provide an image for this architecture? Or if one already exists, could you provide me the link?
Thanks in advance!

ldap not installed

In Tools/InstallationDetails the ldap binaries are indicated as "not installed".

Avoid manual initialization of new library

As for now, if the user does not have an existing library folder, he has to create manually a blank library before to run the docker container. This could be automated in the future.

Access fails from Nginx reverse proxy, works from localhost

Hello!

Please excuse me, I am extremely new to linux, nginx, docker, self-hosted etc.

I was able to create the container and can access it using http://localhost:port, however my accessing from my website via reverse proxy fails.
I am able to access the i-librarian login screen, but after entering credentials I receive an error 405 message "OOPS Request method must be POST". I imagine that it has to do with the configuration of my nginx conf file for this container, but to rectify it I am completely lost. I attached a screenshot of my conf.

I would appreciate any ideas for next steps!!

Thank you.
Capture

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.