# -*- coding: utf-8 -*- # # This file is part of CERN Search. # Copyright (C) 2018-2021 CERN. # # Citadel Search is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. # Use CentOS8: FROM inveniosoftware/centos8-python:3.8 # Install pre-requisites RUN yum update -y && yum install -y \ gcc \ openssl \ openldap-devel \ https://linuxsoft.cern.ch/cern/centos/8/CERN/x86_64/Packages/CERN-CA-certs-20200530-1.el8.cern.noarch.rpm \ mailcap # Uninstall python3.6 due to poetry bug (and leave node) # https://github.com/python-poetry/poetry/issues/3463 RUN rpm -e --nodeps python36 && node -v # Symlink python RUN ln -nsf /usr/bin/python3.8 /usr/bin/python && python -V && whereis python # CERN Search installation WORKDIR /${WORKING_DIR}/src COPY poetry.lock pyproject.toml /${WORKING_DIR}/src/ # Install dependencies globally # Still using get-poetry due to https://github.com/python-poetry/poetry/issues/3870 # RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_VERSION=1.1.6 python # ENV PATH="${PATH}:/root/.local/bin" RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_VERSION=1.1.6 python ENV PATH="${PATH}:/root/.poetry/bin" RUN poetry --version && poetry config virtualenvs.create false -vvv && \ poetry install --no-root --no-dev --no-interaction --no-ansi