Dockerfile 2.11 KB
Newer Older
1 2
# FOSSology Dockerfile
# Copyright Siemens AG 2016, fabio.huser@siemens.com
3
# Copyright TNG Technology Consulting GmbH 2016-2017, maximilian.huber@tngtech.com
4 5 6 7 8 9 10 11
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.  This file is offered as-is,
# without any warranty.
#
# Description: Docker container image recipe

12
FROM debian:jessie
13

14
LABEL maintainer="Fossology <fossology@fossology.org>"
15

16
WORKDIR /fossology
17

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
 && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends lsb-release sudo \
 && rm -rf /var/lib/apt/lists/*

COPY ./utils/fo-installdeps ./utils/fo-installdeps
COPY ./utils/utils.sh ./utils/utils.sh
COPY ./src/delagent/mod_deps ./src/delagent/
COPY ./src/mimetype/mod_deps ./src/mimetype/
COPY ./src/pkgagent/mod_deps ./src/pkgagent/
COPY ./src/scheduler/mod_deps ./src/scheduler/
COPY ./src/ununpack/mod_deps ./src/ununpack/
COPY ./src/wget_agent/mod_deps ./src/wget_agent/
COPY ./install/scripts/php-conf-fix.sh ./install/scripts/php-conf-fix.sh
COPY ./utils/install_composer.sh ./utils/install_composer.sh

RUN DEBIAN_FRONTEND=noninteractive apt-get update \
 && DEBIAN_FRONTEND=noninteractive /fossology/utils/fo-installdeps --everything -y \
 && rm -rf /var/lib/apt/lists/* \
 && /fossology/install/scripts/php-conf-fix.sh --overwrite \
 && /fossology/utils/install_composer.sh
38

39
COPY . .
40

41
RUN make install && make clean
42

43 44
# the database is filled in the entrypoint
RUN /usr/local/lib/fossology/fo-postinstall --agent --common --scheduler-only --web-only --no-running-database
45

46 47 48 49 50 51
# configure apache
RUN cp /fossology/install/src-install-apache-example.conf /etc/apache2/conf-available/fossology.conf \
 && ln -s /etc/apache2/conf-available/fossology.conf /etc/apache2/conf-enabled/fossology.conf \
 && mkdir -p /var/log/apache2/ \
 && ln -sf /proc/self/fd/1 /var/log/apache2/access.log \
 && ln -sf /proc/self/fd/1 /var/log/apache2/error.log
52

53
EXPOSE 80
54

55
RUN chmod +x /fossology/docker-entrypoint.sh
56
ENTRYPOINT ["/fossology/docker-entrypoint.sh"]