Skip to content

Best way to make a Dockerfile #83

Description

@luandro

At Coolab we've been using Kolibri with a docker-compose nginx-proxy setup. Since there seems to be no official docker image I had to create my own.

Initially I was using this Dockerfile, using a python image. It did work, but Kolibri was really chewing CPU.

Now I'm trying to use kolibri-server as it seems to be more efficient. Here's the Dockerfile I'm trying:

FROM ubuntu:latest

RUN apt-get update -y && apt-get upgrade -y
RUN apt-get install -y software-properties-common dirmngr
RUN add-apt-repository ppa:learningequality/kolibri
RUN apt-get update -y
RUN apt-get install -y kolibri-server
USER kolibri

CMD ["kolibri", "start", "--foreground"]

It seems to install and run ok, but mapping port 8080 doesn't work. Here's the docker-compose.yml:

version: "3"

services:
  kolibri:
     build: .
     restart: always
     volumes:
        - ${MEDIA_DIR}:/root/.kolibri
     environment:
        LETSENCRYPT_HOST: ${DOMAIN}
        LETSENCRYPT_EMAIL: ${EMAIL}
        VIRTUAL_HOST: ${DOMAIN}
        VIRTUAL_PORT: 8080
networks:
  default:
    external:
      name: nginx-proxy

update: seems like the process is exiting. Full log here.

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions