-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile-base
39 lines (32 loc) · 1.46 KB
/
Dockerfile-base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# -*- 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 (but don't unistall 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