2018-07-11 12:50:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								FROM  ubuntu:18.04 
  
						 
					
						
							
								
									
										
										
										
											2017-01-05 22:03:47 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								MAINTAINER  Tim Byrne <sultan@locehilios.com> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-07-11 12:50:42 +00: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
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-12-21 21:30:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Create a flag to identify when running inside the yadm testbed 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN  touch /.yadmtestbed
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-05 22:03:47 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# Install prerequisites 
  
						 
					
						
							
								
									
										
										
										
											2019-03-01 04:28:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								RUN  \ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  apt-get update &&  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  apt-get install -y \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    curl \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    expect \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    git \ 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-12-01 02:15:46 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    gnupg \ 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-01 04:28:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    lsb-release \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    make \ 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-01-20 14:21:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    man \ 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-03-01 04:28:32 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    python3-pip \ 
 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-16 13:04:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    vim \ 
 
							 
						 
					
						
							
								
									
										
										
										
											2020-12-21 21:30:28 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  &&  rm -rf /var/lib/apt/lists/*; 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ARG  SC_VER = 0 .7.1
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN  \ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  curl -fLo - \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  https://github.com/koalaman/shellcheck/releases/download/v$SC_VER /shellcheck-v$SC_VER .linux.x86_64.tar.xz |  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  tar -xJv &&  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  mv shellcheck-v$SC_VER /shellcheck /usr/bin &&  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  rm -rf shellcheck-v$SC_VER 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								COPY  test/requirements.txt /tmp/requirements.txt
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN  pip3 install --upgrade pip setuptools
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								RUN  pip3 install --upgrade -r /tmp/requirements.txt
  
						 
					
						
							
								
									
										
										
										
											2017-01-05 22:03:47 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-07-08 05:58:54 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								RUN  \ 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  curl https://raw.githubusercontent.com/jirutka/esh/v0.3.0/esh > /usr/local/bin/esh &&  \ 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  chmod +x /usr/local/bin/esh
 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-20 02:27:14 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-01-05 22:03:47 +00: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