Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Dockerfile - github.com/readthedocs/sphinx_rtd_theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8f0df08069e5f7d48ec314fc28002fe43636e064 (plain)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This implicitely includes Python 3.10
FROM node:14-alpine

# Do not use --update since that will also fetch the
# latest node-current package
# 'make' is needed for building documentation
RUN apk add npm make py3-pip py3-wheel

# Add an extra verification that we have the right node
# because the above caused issues
RUN python3 --version
RUN node -v && node -v | grep -q v14 &&\
    python3 --version && python3 --version | grep -q "3.10"

RUN pip install pip --upgrade

RUN mkdir -p /project/src/ &&\
    mkdir -p /project/docs/ &&\
    mkdir -p /project-minimal-copy/sphinx_rtd_theme &&\
    touch /project-minimal-copy/sphinx_rtd_theme/__init__.py

WORKDIR /project

COPY package.json /project/

# COPY package-lock.json /project/

COPY bin/preinstall.js /project/bin/preinstall.js

RUN cd /project

# It matters that the node environment is installed into the same
# folder, i.e. /project where we will run the environment from
RUN npm install --package-lock-only &&\
    npm audit fix &&\
    npm install

# This is strictly speaking not necessary, just makes
# running the container faster...
# Install dependencies, then uninstall project itsel
COPY setup.py README.rst /project-minimal-copy/
RUN cd /project-minimal-copy &&\
    pip install ".[dev]" &&\
    /usr/bin/yes | pip uninstall sphinx_rtd_theme


# Copy in stuff we need to run the project
COPY webpack.common.js webpack.dev.js webpack.prod.js /project/

COPY docker-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]