Replace ubuntu with debian

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
This commit is contained in:
Eric Riggs
2018-04-26 03:54:40 -04:00
parent f3c86ada45
commit a84568574f
2 changed files with 158 additions and 20 deletions
+8 -20
View File
@@ -4,13 +4,13 @@
# Base image start #
####################
FROM ubuntu:16.04 as BASE_IMAGE
FROM debian:9.4-slim as BASE_IMAGE
MAINTAINER Roberto Rosario "roberto.rosario@mayan-edms.com"
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED 1
ENV LANG en_US.UTF-8
ENV LANG C.UTF-8
ENV PROJECT_INSTALL_DIR=/usr/local/lib/python2.7/dist-packages/mayan
ARG APT_PROXY
@@ -20,23 +20,19 @@ RUN if [ "${APT_PROXY}" ]; then echo "Acquire::http { Proxy \"http://${APT_PROXY
# Install base Ubuntu libraries
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
g++ \
gcc \
gettext-base \
ghostscript \
gpgv \
graphviz \
libffi-dev \
libjpeg-dev \
libmagic1 \
libmysqlclient-dev \
default-libmysqlclient-dev \
libpng-dev \
libpq-dev \
libreoffice \
libtiff-dev \
locales \
netcat-openbsd \
poppler-utils \
python-dev \
python-pip \
@@ -52,12 +48,6 @@ apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/* && \
rm -f /var/cache/apt/archives/*.deb
# Switch to UTF locale
RUN echo "LC_ALL=\"en_US.UTF-8\"" >> /etc/default/locale && \
locale-gen en_US.UTF-8 && \
update-locale LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8
# Install apt-get-install
ADD https://raw.githubusercontent.com/guilhem/apt-get-install/master/apt-get-install /usr/bin/
RUN chmod +x /usr/bin/apt-get-install
@@ -77,14 +67,16 @@ ln -s /usr/lib/aarch64-linux-gnu/libjpeg.so /usr/lib/ \
# Build image start #
#####################
FROM python:2-alpine3.7 as BUILDER_IMAGE
FROM debian:9.4-slim as BUILDER_IMAGE
# Package caching
RUN if [ "${APT_PROXY}" ]; then echo "Acquire::http { Proxy \"http://${APT_PROXY}\"; };" > /etc/apt/apt.conf.d/01proxy; fi
WORKDIR /code
COPY . /code
RUN apk update && \
apk add make
RUN apt-get update && apt-get install make python-dev python-pip -y
RUN pip install -r requirements/build.txt
@@ -129,10 +121,6 @@ COPY docker/entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/entrypoint.sh / # backwards compat
ENTRYPOINT ["entrypoint.sh"]
# Healthcheck setup
HEALTHCHECK --interval=15s --timeout=1s --retries=20 \
CMD curl -s -f http://localhost/authentication/login/ | grep 'form' > /dev/null || exit 1
EXPOSE 8000
CMD ["mayan"]