weblate/dev-docker/Dockerfile
Aleksandr Loktionov 263b0017eb Docker: Fix user and group in dev-docker
Create user and group while building dev-docker image
to fix 'Failed to generate key: b'No user exists for uid ...\r\n''
error

Signed-off-by: Aleksandr Loktionov <loktionovam@gmail.com>
2020-01-28 11:48:39 +01:00

45 lines
1.2 KiB
Docker

FROM weblate/weblate:edge
##########
# WARNING!
# This dockerfile is meant to be used in the development process
# and WILL perform very poorly in production.
#
# For production-ready dockerfile see:
# https://github.com/WeblateOrg/docker
#########
#WORKDIR /srv
# TODO: put some new dependencies here
ARG USER_ID=1000
ARG GROUP_ID=1000
USER root
# Following are removed during cleanup of weblate/weblate
RUN apt-get update && apt-get install -y \
python3-dev \
pkg-config \
libleptonica-dev \
libtesseract-dev \
libxml2-dev \
libxmlsec1-dev \
libffi-dev \
cython \
gcc \
g++ \
libsasl2-dev \
libldap2-dev \
libssl-dev \
&& if ! getent group "${GROUP_ID}"; then \
groupadd --gid "${GROUP_ID}" developer; \
fi \
&& if ! getent passwd "${USER_ID}"; then \
useradd --gid "${GROUP_ID}" --uid "${USER_ID}" --shell /bin/bash developer; \
fi
COPY requirements.txt /tmp/
RUN pip3 install -r /tmp/requirements.txt
# List should match weblate/weblate
RUN chmod -R 777 /etc/nginx/sites-available/ /var/log/nginx/ /var/lib/nginx /app/data /run /home /home/weblate /etc/timezone /etc/localtime