Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ubuntu based Docker image capable of running AWS SAM CLI tests
FROM ubuntu
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
software-properties-common \
python-dev \
python-pip \
build-essential \
git \
libssl-dev \
zlib1g-dev \
libbz2-dev \
libreadline-dev \
libsqlite3-dev \
libffi-dev \
tzdata \
curl
# Install pyenv and export it to PATH
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV HOME /root
ENV PYENV_ROOT $HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv install 3.7.0 && \
pyenv install 3.6.4 && \
pyenv install 2.7.14
RUN pyenv global 3.7.0 3.6.4 2.7.14
RUN pip install --upgrade pip
WORKDIR /app
RUN pip install tox
# Fix timezone and encoding issues
ENV TZ UTC
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.