Docker4ojs: A set of docker images for OJS



Awesome, i’ve created tagged builds containing latest version of 2.x and
3.x, you can check at: TAGS



Hi @lucasdiedrich

Sorry for the silence. I was on xmas vacations… and I’m starting to clear out my inbox.

I took a fast look to your work and I need to say that I’m impressed: Alpine was on my toDo, but you documented the Dockfile very well with some ENV variables and useful scripts… but building from git based on script is really smart solution. Great job. Thanks.

Let me a couple of days to test your dock and compare with my former work to suggest improvements (if any).

BTW, do you have any experience setting official repos in docker hub? Looks like the natural steep now. Are you interested in keeping this repo up to date?


Hi all,

Just a note that I’ve run into another long-forgotten Docker config for OJS:

Not sure if there’s anything useful there, but linking it in.

Alec Smecher
Public Knowledge Project Team


Yes… I know about this one. It’s the first you find in docker hub when you are looking for “pkp ojs” containers.

I based my first Dockerfile in his work but it’s quite old and @lucasdiedrich work is much better.

Scielo also worth a look (not based on git, but good use of ENV variables):

Here you have a list of all the ojs docks published in docker hub:

Is not published in docker hub, but @axfelix also implemented a Dockerfile for ojs:

I think we need to unificate all this work and deploy an official Dockerfile that could be used for development and production sites.

@asmecher what do you think?


Hi @marc,

Yes, absolutely! It would be great to be able to point to a single “official” resource for this.

Alec Smecher
Public Knowledge Project Team


Hi @marc,

There still some improvements that we can do, add more environment variables or cli installation, add supervisor to manage apache ( this idea i saw over axfelix image), and some other stuff.

But to make this i think we should first create and oficial github project, maybe you can fork my project into pkp github domain, and then we can manage the improvements over issues. Later we can create and oficial repo over

What do you think?


@asmecher I reviewed all the existing Dockerfiles and IMHO Lucas’ is the most promising on, so I’m ok with the suggested roadmap.

@lucasdiedrich does it means that you are offering yourself to lead and maintain this? :wink:

Some comments about your last post:

  • supervisor sounds also like a nice idea.
  • What ENV vars do you miss?
  • As far as I know, there is no “cli installation” script for OJS, so in past I did this “sed-ing” over the SQL dump of a clean “pre-installed” database. I worked a little on this over a bash script called docker4ojs (aka. dojo). This script was developed to keep a farm of OJS.
  • I will also add “treafik” to the wish list. I’m working on this right now.



Marc, i’ve added some issues to optimize the docker image, i’m going to
make a sprint dev this week to optimize it. I’m thinking, can you point out
someone who can validate for me the apache packages installed over the

I’m thinking there is to much apache/php libraries installed, it all of
then necessary?



I will take a look but @asmecher is the best person for this job. Nobody knows OJS like him.

Alec, here you have the dependence list:

PACKAGES=“dcron apache2 apache2-ssl apache2-utils php5 php5-fpm php5-cli php5-apache2 php5-zlib
php5-json php5-phar php5-openssl php5-mysql php5-curl php5-mcrypt php5-pdo_mysql php5-ctype
php5-gd php5-xml php5-dom php5-iconv curl nodejs git” \

In the other hand @lucasdiedrich I recommend moving your entire ENV section to an .env file.
EXCLUDE var is hudge and taking all this info out will make your Dockerfile much more readable.

Please, keep us informed about your advances.



Hi all,

This looks like excellent work – thanks, @lucasdiedrich and @marc and everyone else who’s contributing here.

I’ve reviewed the dependency list against the Travis scripts, which are responsible for setting up a working git install of OJS from a fairly basic Ubuntu VM. The only packages I don’t see listed here are php5-intl and php5-xsl. (These may or may not be necessary for PHP7 – IIRC they’re needed for PHP5. If they are available, no harm in installing them, I think.)

Alec Smecher
Public Knowledge Project Team


@lucasdiedrich sorry for the silence. I was kind of overwhelmed with different fire fronts. Any update about your work? Do you need help?

I’m finishing my upgrade script inside dojo (docker4ojs helper).

If you finished your Dockerfile please advice us so we can take a second-deeper look and we start talking if it must be moved to pkp’s github domain (to be clear: I say yes, but I’m not the one that takes the decision :slight_smile: ).




I modified dojo (a bash script to keep a farm of journals) to work against luca’s Dockerfile (more lightweight and smart than all the other attempts) and now is working like a charm.

Now I like to extend my base docker-compose with (at least) treafik and HTTPs so I will keep working on “docker4ojs” for a few weeks.

My intention is testing it all in production, for a single journal… after Easter’s vacations or so.

@lucasdiedrich please, let us know if you finished your work with your Dockerfile for a second testing round.


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.