Skip to content

Commit

Permalink
Update build environment from template
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmasuch committed Nov 19, 2020
1 parent 8a2736c commit 9ab1f2b
Showing 1 changed file with 38 additions and 11 deletions.
49 changes: 38 additions & 11 deletions .github/actions/build-environment/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ ENV LC_ALL="en_US.UTF-8" \
LANG="en_US.UTF-8" \
LANGUAGE="en_US:en" \
TZ="Europe/Berlin" \
DEBIAN_FRONTEND="noninteractive"
DEBIAN_FRONTEND="noninteractive" \
RESOURCES_PATH="/resources"

# Create resources folder
RUN mkdir $RESOURCES_PATH && chmod a+rwx $RESOURCES_PATH

# Install basics
# hadolint ignore=DL3005
Expand All @@ -36,6 +40,14 @@ RUN apt-get update --fix-missing \
git \
jq \
software-properties-common \
# Required by Pyenv
make \
build-essential \
libbz2-dev \
libssl-dev \
libreadline-dev \
libsqlite3-dev \
libffi-dev \
# Clean up
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -77,10 +89,18 @@ RUN apt-get update \
pydocstyle==5.* \
isort==5.* \
docker==4.* \
nox==2020.8.* \
pipenv==2020.11.* \
# Clean up
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install pyenv to allow dynamic creation of python versions
RUN git clone https://github.com/pyenv/pyenv.git $RESOURCES_PATH/.pyenv
# Add pyenv to path
ENV PATH=$RESOURCES_PATH/.pyenv/shims:$RESOURCES_PATH/.pyenv/bin:$PATH \
PYENV_ROOT=$RESOURCES_PATH/.pyenv

# Install web development tools
RUN apt-get update \
&& curl -sL https://deb.nodesource.com/setup_12.x | bash - \
Expand All @@ -90,16 +110,23 @@ RUN apt-get update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install documentation dependencies
RUN pip install \
mkdocs==1.* \
mkdocs-material==6.* \
pymdown-extensions==8.* \
pygments==2.* \
markdown-include==0.6.* \
mkdocs-awesome-pages-plugin==2.* \
mkdocs-markdownextradata-plugin==0.1.* \
&& npm install -g markdownlint@^0.21.1 markdownlint-cli@^0.24.0
# Install markdown lint tool
RUN npm install -g markdownlint@^0.21.1 markdownlint-cli@^0.24.0

# Workaround to get ssh working in act and github actions
RUN mkdir -p /github/home/.ssh/ \
# create empty config file if not exists
&& touch /github/home/.ssh/config \
&& chown -R root:root /github/home/.ssh \
&& chmod 700 /github/home/.ssh \
&& ln -s /github/home/.ssh /root/.ssh

# Settings and configurations
ENV \
# Flush log message immediately to stdout
PYTHONUNBUFFERED=true \
# Use local folder as pipenv virtualenv
PIPENV_VENV_IN_PROJECT=true

# Install Universal-Build
# hadolint ignore=DL3013
Expand Down

0 comments on commit 9ab1f2b

Please sign in to comment.