mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Improve docker builds and documentation
* Refactor Dockerfile to build from source instead of pypi * Include an additional dockerfile for building from pypi * Update readme documentation for docker to specify image sources and docker-specific run instructions
This commit is contained in:
27
Dockerfile
27
Dockerfile
@@ -1,19 +1,34 @@
|
||||
FROM python:3-alpine
|
||||
|
||||
# Based on the work of Jonathan Boeckel <jonathanboeckel1996@gmail.com>
|
||||
# https://gitlab.com/Joniator/docker-maloja
|
||||
# https://github.com/Joniator
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy project into dir
|
||||
COPY . .
|
||||
|
||||
RUN apk add --no-cache --virtual .build-deps \
|
||||
gcc \
|
||||
libxml2-dev \
|
||||
libxslt-dev \
|
||||
py3-pip \
|
||||
libc-dev \
|
||||
linux-headers \
|
||||
&& \
|
||||
# install pip3
|
||||
py3-pip \
|
||||
linux-headers && \
|
||||
pip3 install psutil && \
|
||||
pip3 install --upgrade --no-cache-dir malojaserver && \
|
||||
# use pip to install maloja project requirements
|
||||
pip3 install --no-cache-dir -r requirements.txt && \
|
||||
# use pip to install maloja as local project
|
||||
pip3 install /usr/src/app && \
|
||||
apk del .build-deps
|
||||
|
||||
EXPOSE 42010
|
||||
RUN apk add --no-cache tzdata
|
||||
|
||||
ENTRYPOINT maloja run
|
||||
# expected behavior for a default setup is for maloja to "just work"
|
||||
ENV MALOJA_SKIP_SETUP=yes
|
||||
|
||||
EXPOSE 42010
|
||||
# use exec form for better signal handling https://docs.docker.com/engine/reference/builder/#entrypoint
|
||||
ENTRYPOINT ["maloja", "run"]
|
||||
Reference in New Issue
Block a user