Skip to content

Commit

Permalink
docker: use fedora base image
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalEgn committed Jul 31, 2024
1 parent c87059e commit 53697d2
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 108 deletions.
99 changes: 46 additions & 53 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,40 +24,32 @@
# Modified and simplified version of https://github.com/inspirehep/inspire-docker
# to build an imagine to run in https://github.com/inspirehep/inspirehep

FROM centos:7
# https://www.redhat.com/en/blog/centos-linux-has-reached-its-end-life-eol
# https://serverfault.com/a/1161904
COPY CentOS-Base.repo ./etc/yum.repos.d/CentOS-Base.repo
RUN yum clean all && yum makecache

RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum update -y --nogpgcheck && \
yum install -y --nogpgcheck \
ImageMagick \
transfig \
file \
firefox \
gcc \
gcc-c++ \
git \
kstart \
libffi-devel \
libxml2-devel \
libxslt-devel \
mailcap \
make \
openssl-devel \
poppler-utils \
postgresql \
postgresql-libs \
postgresql-devel \
python-pip \
python-devel \
python2-xrootd \
wget \
Xvfb \
&& \
yum clean all
FROM fedora:41

RUN dnf update -y
RUN dnf install -y ImageMagick
RUN dnf install -y transfig
RUN dnf install -y file
RUN dnf install -y firefox
RUN dnf install -y gcc
RUN dnf install -y gcc-c++
RUN dnf install -y git
RUN dnf install -y kstart
RUN dnf install -y libffi-devel
RUN dnf install -y libxml2-devel
RUN dnf install -y libxslt-devel
RUN dnf install -y mailcap
RUN dnf install -y install xrootd-client-devel
RUN dnf install -y openssl-devel
RUN dnf install -y poppler-utils
RUN dnf install -y postgresql
RUN dnf install -y postgresql-libs
RUN dnf install -y postgresql-devel
RUN dnf install -y python2.7
RUN dnf install -y wget
RUN dnf install -y Xvfb
RUN dnf install -y xrootd
RUN dnf clean all

ENV NODE_VERSION 6.17.1
RUN mkdir /usr/local/nvm
Expand All @@ -80,32 +72,33 @@ RUN npm install -g \
requirejs \
uglify-js

ENV PATH="/root/.poetry/bin:${PATH}" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_VERSION=1.1.14

WORKDIR /code

RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/4ec09d4e6b8ca007e67bb873c96277b54986fbdb/get-poetry.py \
| sed -E 's/(self\._get\(self\.METADATA_URL\).decode)\(\)/\1("utf-8")/' \
| python && \
poetry --version && \
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --ignore-installed --no-cache-dir --upgrade pip==20.3.4 && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir --upgrade wheel && \
pip install --no-cache-dir typing==3.7.4.1
RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py && \
python2 get-pip.py && \
rm get-pip.py

RUN python2.7 -m pip install poetry==1.1.15
RUN python2.7 -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --ignore-installed --upgrade pip==20.3.4
RUN python2.7 -m pip install --upgrade setuptools
RUN python2.7 -m pip install --upgrade wheel
RUN python2.7 -m pip install typing==3.7.4.1

COPY . .

RUN poetry export --without-hashes -E all -E xrootd -f requirements.txt > requirements.poetry.txt && \
pip install --ignore-installed --requirement requirements.poetry.txt && \
pip install -e .
RUN poetry config virtualenvs.create false
RUN poetry export --without-hashes -E all -E xrootd -f requirements.txt > requirements.poetry.txt
RUN python2.7 -m pip install --ignore-installed --requirement requirements.poetry.txt
RUN python2.7 -m pip install -e .
RUN python2.7 -m pip install git+https://github.com/PascalEgn/xrootd-python.git
RUN python2.7 -m pip install pathlib2==2.3.5 six==1.14.0 urllib3==1.24.3


WORKDIR /usr/var/inspirehep-instance/static

RUN inspirehep npm && \
npm install && \
inspirehep collect -v && \
inspirehep assets build
RUN inspirehep npm
RUN npm install
RUN inspirehep collect -v
RUN inspirehep assets build

WORKDIR /code
101 changes: 46 additions & 55 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,32 @@
# Modified and simplified version of https://github.com/inspirehep/inspire-docker
# to build an imagine to run in https://github.com/inspirehep/inspirehep

FROM centos:7
# https://www.redhat.com/en/blog/centos-linux-has-reached-its-end-life-eol
# https://serverfault.com/a/1161904
COPY CentOS-Base.repo ./etc/yum.repos.d/CentOS-Base.repo
RUN yum clean all && yum makecache

RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum update -y --nogpgcheck && \
yum install -y --nogpgcheck \
yum update -y && \
yum install -y \
ImageMagick \
transfig \
file \
firefox \
gcc \
gcc-c++ \
git \
kstart \
libffi-devel \
libxml2-devel \
libxslt-devel \
mailcap \
make \
openssl-devel \
poppler-utils \
postgresql \
postgresql-libs \
postgresql-devel \
python-pip \
python-devel \
python2-xrootd \
wget \
Xvfb \
&& \
yum clean all
FROM fedora:41

RUN dnf update -y
RUN dnf install -y ImageMagick
RUN dnf install -y transfig
RUN dnf install -y file
RUN dnf install -y firefox
RUN dnf install -y gcc
RUN dnf install -y gcc-c++
RUN dnf install -y git
RUN dnf install -y kstart
RUN dnf install -y libffi-devel
RUN dnf install -y libxml2-devel
RUN dnf install -y libxslt-devel
RUN dnf install -y mailcap
RUN dnf install -y install xrootd-client-devel
RUN dnf install -y openssl-devel
RUN dnf install -y poppler-utils
RUN dnf install -y postgresql
RUN dnf install -y postgresql-libs
RUN dnf install -y postgresql-devel
RUN dnf install -y python2.7
RUN dnf install -y wget
RUN dnf install -y Xvfb
RUN dnf install -y xrootd
RUN dnf clean all

ENV NODE_VERSION 6.17.1
RUN mkdir /usr/local/nvm
Expand All @@ -82,32 +72,33 @@ RUN npm install -g \
requirejs \
uglify-js

ENV PATH="/root/.poetry/bin:${PATH}" \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_VERSION=1.1.14

WORKDIR /code

RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/4ec09d4e6b8ca007e67bb873c96277b54986fbdb/get-poetry.py \
| sed -E 's/(self\._get\(self\.METADATA_URL\).decode)\(\)/\1("utf-8")/' \
| python && \
poetry --version && \
pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --ignore-installed --no-cache-dir --upgrade pip==20.3.4 && \
pip install --no-cache-dir --upgrade setuptools && \
pip install --no-cache-dir --upgrade wheel && \
pip install --no-cache-dir typing==3.7.4.1
RUN wget https://bootstrap.pypa.io/pip/2.7/get-pip.py && \
python2 get-pip.py && \
rm get-pip.py

RUN python2.7 -m pip install poetry==1.1.15
RUN python2.7 -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --ignore-installed --upgrade pip==20.3.4
RUN python2.7 -m pip install --upgrade setuptools
RUN python2.7 -m pip install --upgrade wheel
RUN python2.7 -m pip install typing==3.7.4.1

COPY . .

RUN poetry export --without-hashes -E all -f requirements.txt > requirements.poetry.txt && \
pip install --ignore-installed --src /opt/python-git-modules/ --requirement requirements.poetry.txt && \
pip install -e .
RUN poetry config virtualenvs.create false
RUN poetry export --without-hashes -E all -f requirements.txt > requirements.poetry.txt
RUN python2.7 -m pip install --ignore-installed --src /opt/python-git-modules/ --requirement requirements.poetry.txt
RUN python2.7 -m pip install -e .
RUN python2.7 -m pip install git+https://github.com/PascalEgn/xrootd-python.git
RUN python2.7 -m pip install pathlib2==2.3.5 six==1.14.0 urllib3==1.24.3


WORKDIR /usr/var/inspirehep-instance/static

RUN inspirehep npm && \
npm install && \
inspirehep collect -v && \
inspirehep assets build
RUN inspirehep npm
RUN npm install
RUN inspirehep collect -v
RUN inspirehep assets build

WORKDIR /code

0 comments on commit 53697d2

Please sign in to comment.