@@ -19,7 +19,11 @@ ENV LC_ALL="en_US.UTF-8" \
1919 LANG="en_US.UTF-8" \
2020 LANGUAGE="en_US:en" \
2121 TZ="Europe/Berlin" \
22- DEBIAN_FRONTEND="noninteractive"
22+ DEBIAN_FRONTEND="noninteractive" \
23+ RESOURCES_PATH="/resources"
24+
25+ # Create resources folder
26+ RUN mkdir $RESOURCES_PATH && chmod a+rwx $RESOURCES_PATH
2327
2428# Install basics
2529# hadolint ignore=DL3005
@@ -36,6 +40,14 @@ RUN apt-get update --fix-missing \
3640 git \
3741 jq \
3842 software-properties-common \
43+ # Required by Pyenv
44+ make \
45+ build-essential \
46+ libbz2-dev \
47+ libssl-dev \
48+ libreadline-dev \
49+ libsqlite3-dev \
50+ libffi-dev \
3951 # Clean up
4052 && apt-get clean \
4153 && rm -rf /var/lib/apt/lists/*
@@ -77,10 +89,18 @@ RUN apt-get update \
7789 pydocstyle==5.* \
7890 isort==5.* \
7991 docker==4.* \
92+ nox==2020.8.* \
93+ pipenv==2020.11.* \
8094 # Clean up
8195 && apt-get clean \
8296 && rm -rf /var/lib/apt/lists/*
8397
98+ # Install pyenv to allow dynamic creation of python versions
99+ RUN git clone https://github.com/pyenv/pyenv.git $RESOURCES_PATH/.pyenv
100+ # Add pyenv to path
101+ ENV PATH=$RESOURCES_PATH/.pyenv/shims:$RESOURCES_PATH/.pyenv/bin:$PATH \
102+ PYENV_ROOT=$RESOURCES_PATH/.pyenv
103+
84104# Install web development tools
85105RUN apt-get update \
86106 && curl -sL https://deb.nodesource.com/setup_12.x | bash - \
@@ -90,16 +110,23 @@ RUN apt-get update \
90110 && apt-get clean \
91111 && rm -rf /var/lib/apt/lists/*
92112
93- # Install documentation dependencies
94- RUN pip install \
95- mkdocs==1.* \
96- mkdocs-material==6.* \
97- pymdown-extensions==8.* \
98- pygments==2.* \
99- markdown-include==0.6.* \
100- mkdocs-awesome-pages-plugin==2.* \
101- mkdocs-markdownextradata-plugin==0.1.* \
102- && npm install -g markdownlint@^0.21.1 markdownlint-cli@^0.24.0
113+ # Install markdown lint tool
114+ RUN npm install -g markdownlint@^0.21.1 markdownlint-cli@^0.24.0
115+
116+ # Workaround to get ssh working in act and github actions
117+ RUN mkdir -p /github/home/.ssh/ \
118+ # create empty config file if not exists
119+ && touch /github/home/.ssh/config \
120+ && chown -R root:root /github/home/.ssh \
121+ && chmod 700 /github/home/.ssh \
122+ && ln -s /github/home/.ssh /root/.ssh
123+
124+ # Settings and configurations
125+ ENV \
126+ # Flush log message immediately to stdout
127+ PYTHONUNBUFFERED=true \
128+ # Use local folder as pipenv virtualenv
129+ PIPENV_VENV_IN_PROJECT=true
103130
104131# Install Universal-Build
105132# hadolint ignore=DL3013
0 commit comments