Docker4ojs: A set of docker images for OJS

Hi marc, sorry for the longe time to answer, i’ve made some upgrades at the containers, can you check at de github repo?

Anything you need just ask that i can upgrade.


Hi @marc, just wan’t to know, i’m upgrading some things at the container, let me know if you wan’t that i change something, next upgrade i will change the alpine to 3.8 and ensure apache to run as apache not root.


Hi @lucasdiedrich

Yes, long time. So long that I though you abandoned us. :wink:

If you are still keeping this rolling, I have some suggestions for your Dockerfile. Most of them are optional, but will help me a lot to keep things sorted with the “dojo” script.

Sorry for the silence… I was on vacations till yesterday. :slight_smile:

I will write a (short) list as soon as I put out the usual fires you find when you are back.


BTW, I like to open a related discussion here (if it’s long, may be we need to open a new thread). What do you all think about docker “official-images”? Worth the effort?

I mean, I think would be great for PKP to create an keep an official image for OJS… there will be no discussions about what Dockerfile you need to install and people will be more confident running it, but I never did the job so I’m unsure about how much work it means creating and keeping it up to date.

Here you have some documentation:

What do you think? Any comment is welcome.

I really think its worth and agree with your points, i’ll read the docs and give a better feedback about the process.
I don’t know about you, but is there any plans about extending this idea to the others PKP projects, like OCS, OMP and OHS?

Another point, we need to automate the building proccess when a new tag is created also, going to look this.

IMHO a recipe for OMP is a must… and I suspect it will be really easy because at the end, OMP is very close to OJS and requirements are exacly the same.

On the other hand, OCS is now deprecated and frozen. PKP likes to refactor it, but they don’t not enough dev hands to do the job. Hopefully it could change in a close future. In other words: I suggest waiting till a developer starts to work in OCS 3.x, if it finally happens.

I’m unsure about OHS. It’s requirements will be quite different to OJS/OMP, the development is stucked in 2014… so I don’t know if somebody will be interested in running this inside a docker.

On contrary, although most of the people don’t know much about it, I think OTS (Open Typesetting Stack) is a really good candidate to be dockerized. PKP offers a free server, but a distributed model will be more sustainable.

I wanted to start with OTS this on summer, but I couldn’t. :cry:

So, in short:

  • Dockerize (by order): 1) OJS 2) OMP 3)OTS.
  • Wait: OCS, OHS.

@asmecher please, correct me if you don’t agree.

Hi all,

Thanks, @marc – yes, you’re correct on all points. FYI even if we don’t have the people to commit to OCS at the moment we’re still in a sense moving towards it by more closely aligning OJS and OMP; the differences between our applications are being carefully resolved and eventually it’ll mean that spinning off another application (like a rewrite of OCS) will become easier. But it’s too early to promise any kind of timeline.

As for OTS, you’re correct there as well, but I’ll note that we’re becoming increasingly interested in Grobid as a full replacement for OTS. Its functionality isn’t quite to the same level in some ways but it has a very active community and looks like an excellent piece of software.

Alec Smecher
Public Knowledge Project Team

Hi, guys :slight_smile:

There are any news about the official docker image for OJS?

I tried the lucasdiedrich/ojs image and after some trouble that included change mysql’ version to 5.7 it works, but my manager said that we need to run OJS on PHP7.

I’m not a PHP programmer so I really don’t know how to build and configure an image that uses PHP7 and apache. I tried created an image based on composer:1.7.3 that inherits from php:7-alpine3.8 and I installed nodejs, npm and git. After this I follwed the steps to clone the git repo based on ojs-3_1_1-4, copy to, install composer, node dependencies, mysqli driver and run with php -S

It worked with some bugs, but at least I was able to install OJS this way. The problem is how can I build an production ready image using PHP7?

I think it’ll be awesome if dockerhub have an official image of OJS with a variety of tags, like php5, php7, etc. Probably more people will give OJS a try, since it’s simple to get an instance up and running with docker-compose.

Hi @rockenbach,

I don’t think OJS is working stable with PHP 7, as soon as @asmecher pass me some directions about the container i think we should build the PHP 7 container as well.

@asmecher, is ojs stable with php7?


Hi @rockenbach

Unfortunately there is no official docker image for OJS yet.

I know some pkp developers are interested in an official image, but right now they have their hands full. So, from my own research @lucasdiedrich ‘s work is the closest to an official image that you will find. I created my own Dockerfile but I like lucas’ best.

(BTW Lucas, if is ok for you, next week I will suggest a very few changes to your Dockerfile so my “dojo” script will work “out of the box”… and it will let me avoid keeping a fork of your work).

About php7… as far as I can say (I’m not in production yet) last releases of OJS are running well with php7.

As far as php5 is working fine with ojs 3 I can’t imagine why do you want php7.1 but if you still need it, I think I left this working:

Download and adapt to your needs or try it from dockerhub:

About the docker-compose I full agree with you. It’s a must.

If you change “latest” with the base version you like, you can use this one:

It’s still unmature, but the goal of “dojo” is creating a brainless bash script to work over docker-composes and manage a farm of journals… so if you like a more complex compose, here you have my template:

Please, let us know if you need help or something fails.


1 Like

@lucasdiedrich and @marc, I really appreciate your attention, but on the end we decided to start to code a new project to manage our journal. Our team don’t have PHP experience, so we’ll suffer to make any custom modifications that probably will be requested for our clients.

Thanks again :slight_smile:

Hi @rockenbach that’s interesting, good luck.

@marc i’m on standby over here, just prompt me when you need any changes.


1 Like

Just to update you guys, @arturluizbr have done a new version of his project and I think that is much more complete and is fully customizable.

1 Like

Thanks to for the advice @limendesbar.

I’m so happy @arturluizbr recovered interest in docker&ojs. If I remember well think was one of the firsts to create a dockerfile for OJS.
When I started the project was abandoned so I created my first images based his work and then I discovered @lucasdiedrich one.

The point is, when I found lucas’ image we decided to started a group to develop the official docker image for OJS. By official, I mean it will be deeply tested and PKP team will advice us before every release, so we will be able to lunch the docker image at the same time.

I’m happy to explain that during last weeks, with Potomac and Lucas we have been working to release the latest branch (it’s quite finished) that is a ojs 3.1.2 running on php7.2:

If you prefer to keep in php5 the master branch is still “3.1.1-4”:

Tags and branches need to be sorted to fit PKP names and we like to keep a docker image for every OJS 3.x version released (and the last 2.x) hoping it will be helpful for the whole community.

As you will see in README, this image is released with those features:

  • Preconfigured “restful_url”
  • Persistent volumes for folders and config files.
  • Install script.
  • Upgrade script
  • SSL ready.
  • traefik ready.
  • includes adminier.

I’m sure @arturluizbr new work is as great as it was before but I encourage him to join this “docker4ojs” group and improve together this docker image.

Right now, we are working over lucas’ repository, but if more people is joining, we will probably need to move to a github grup.

Keep in touch,

I would be more than happy if @arturluizbr could help us improve our repository. I checked his respository and there lots of things that we could use like the config-creator.

1 Like

Looks like simple-xml is required in php7 for some plugins:

We need to add to dockerfile: apk add php7-xml php7-simplexml

Took some time, but we finally have official docker images for OJS 3.1.2 or greater (we will progressively add older versions) on an alpine-apache2-php7.x stack.

To make it run, the fastest and easiest way is:

  1. Be sure you have docker and docker-compose installed and updated.
  2. To keep stuff sorted, create a folder for your new site and cd to this folder:
    $ mkdir test-ojs32
    $ cd test-ojs32
  3. Download the docker-compose of the version you like to run. For instance, for OJS 3.2.0-0 (aka. “master”):
    $ wget
  4. Download and edit your .env file (be carefully with the ports and change pwds):
    $ wget
  5. Rise the containers as usual:
    $ docker-compose up -d
  6. Visit the URL and the PORT you set in your .env file, for instance:
  7. Read the image documentation (step 3) to discover how to fill the OJS installation form.

As said, the idea is covering all combinations of:

It’s quite work but looks feasible (we are quite close now) and we think it will help us on following scenarios:

  • Upgrade: Just dockerize your former ojs (ie: ojs 2.4.8) and then, just upgrade the docker to the last release (with a simple call to the entry-point). Helper script will be provided (dojo) to make the work even easier.
  • Testing: General testing, but also to discover what platforms combinations work and what don’t or to reproduce the same scenario somebody reports.
  • Development: We can keep a docker-compose stack with dev tools (debugger, etc).
  • Demos: We can create a demo of any version, at the momment, over playwithdocker.
  • Production: A lightweight, and cache optimized version of OJS with backup/restore features.

Does it make sense to you?

We were also thinking in adding postgre and decoupling php from apache (with php-mpm) in 2 different containers… but we are far from this right now.

1 Like