2018-07-11 08:50:42 -04:00
FROM ubuntu:18.04
2017-01-05 17:03:47 -05:00
MAINTAINER Tim Byrne <sultan@locehilios.com>
2018-07-11 08:50:42 -04:00
# No input during build
ENV DEBIAN_FRONTEND noninteractive
# UTF8 locale
RUN apt-get update && apt-get install -y locales
RUN locale-gen en_US.UTF-8
ENV LANG = 'en_US.UTF-8' LANGUAGE = 'en_US:en' LC_ALL = 'en_US.UTF-8'
# Convenience settings for the testbed's root account
RUN echo 'set -o vi' >> /root/.bashrc
2017-01-05 17:03:47 -05:00
# Install prerequisites
2019-02-28 23:28:32 -05:00
RUN \
apt-get update && \
apt-get install -y \
curl \
expect \
git \
2019-11-30 21:15:46 -05:00
gnupg \
2019-02-28 23:28:32 -05:00
lsb-release \
make \
2020-01-20 09:21:57 -05:00
man \
2019-02-28 23:28:32 -05:00
python3-pip \
shellcheck = 0.4.6-1 \
2019-04-16 09:04:53 -04:00
vim \
2019-02-28 23:28:32 -05:00
;
RUN pip3 install \
envtpl \
2019-09-26 00:12:59 -04:00
j2cli \
flake8 = = 3.7.8 \
pylint = = 2.4.1 \
pytest = = 5.1.3 \
yamllint = = 1.17.0 \
2019-02-28 23:28:32 -05:00
;
2017-01-05 17:03:47 -05:00
2019-02-25 17:30:05 -05:00
# Create a flag to identify when running inside the yadm testbed
RUN touch /.yadmtestbed
2017-01-05 17:03:47 -05:00
# /yadm will be the work directory for all tests
# docker commands should mount the local yadm project as /yadm
WORKDIR /yadm
# Create a Makefile to be used if no /yadm volume is mounted
RUN echo "test:\n\t@echo 'The yadm project must be mounted at /yadm'\n\t@echo 'Try using a docker parameter like -v \"\$\$PWD:/yadm:ro\"'\n\t@false" > /yadm/Makefile
# By default, run all tests defined
CMD make test