Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just sharing the Dockerfile i've made for testing OJS #484

Closed
arturluizbr opened this issue Apr 22, 2015 · 8 comments
Closed

Just sharing the Dockerfile i've made for testing OJS #484

arturluizbr opened this issue Apr 22, 2015 · 8 comments

Comments

@arturluizbr
Copy link

I'm working on a project to apply a personalized template to OJS, so I've made this image to simply run OJS on a Docker container.

It uses master branch of OJS repo (there is a tag for my forked OJS aswell), initializes git submodules and downloads composer dependencies (I was stuck here so much time :'( )

And there is no instructions yet, so you need to check library/php (apache tag) docker image for some reference.

GitHub
https://github.com/arturluizbr/docker-pkp-ojs
Docker Hub
https://registry.hub.docker.com/u/arturluizbr/pkp-ojs/dockerfile/

@arturluizbr arturluizbr changed the title Just sharing the Dockerfile i've made for testing Just sharing the Dockerfile i've made for testing OJS Apr 22, 2015
@nuest
Copy link

nuest commented Feb 9, 2016

I think this is a great idea to make OJS easy to use for newcomers.

Are you aware of any other activities in this area? @asmecher Are there plans to provide an "offical" Dockerfile for OJS?

@asmecher
Copy link
Member

asmecher commented Feb 9, 2016

Hi @nuest! I'm not aware of any Docker work yet, but we do have a Vagrant configuration:
https://github.com/pkp/ojs-vagrant

I'll pass this around the team and see what they think. Meanwhile, I'll leave this open. Thanks for contributing!

@asmecher
Copy link
Member

asmecher commented Feb 9, 2016

Sorry, hi also to @arturluizbr, and sorry if we missed this entry before @nuest's comment.

@nuest
Copy link

nuest commented Feb 17, 2016

Thanks for the feedback and the pointer to the Vagrant configuration.

My plan is to build upon @arturluizbr 's Dockerfiles and the Vagrant configuration to build a docker image that downloads a numbered release (instead of the source) and uses a second docker container for the MySQL database and the files directory.

I am working on this on the side, but I'll report back as soon as I have something working ... or not working :-).

@nuest
Copy link

nuest commented Feb 18, 2016

I've got OJS 2.x running locally with a stack of three docker images. Feedback welcome!

https://github.com/nuest/docker-pkp-ojs (see README.md and files in https://github.com/nuest/docker-pkp-ojs/tree/master/2.x)

Some bumps still, started a discussion in the forum: http://forum.pkp.sfu.ca/t/creating-a-docker-image-to-easily-run-and-deploy-ojs-room-to-improve/8535

@asmecher
Copy link
Member

Thanks, @nuest! Tagging @jnugent on this update.

@asmecher
Copy link
Member

Linking this old entry to some more recent discussion: https://forum.pkp.sfu.ca/t/docker4ojs-a-set-of-docker-images-for-ojs

@frafra
Copy link

frafra commented Feb 19, 2021

I will share mine, which relies on Postgres instead of MySQL; the configuration file is bind mounted.

FROM node:lts-alpine AS node

WORKDIR /app
COPY . .
RUN npm install && npm run build

FROM php:8-apache

COPY --chown=www-data:www-data . .
COPY --chown=www-data:www-data --from=node /app/js/build.js js/
COPY --chown=www-data:www-data --from=node /app/styles/build.css styles/

RUN apt-get update && \
    DEBIAN_FRONTEND=noninteractive apt-get install -qq \
        git \
        unzip \
        libpq-dev \
        libicu-dev
RUN docker-php-ext-install gettext intl pdo pdo_pgsql
RUN curl https://getcomposer.org/composer-stable.phar -o /usr/local/bin/composer && \
    chmod +x /usr/local/bin/composer
RUN composer --working-dir=lib/pkp install && \
    composer --working-dir=plugins/generic/citationStyleLanguage install && \
    composer --working-dir=plugins/paymethod/paypal install

It would be better to have an intermediate build step, not to bring development dependencies in the final image of course.

I could have used the Docker composer image, but that is based on Alpine while the final image is not, so it would not be a good idea to just copy the compiled libraries. It could be better not to rely entirely on Docker "official" images in the first places actually; I was hoping to keep it simple.

@NateWr NateWr closed this as completed Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants