# Defines Docker image suitable for testing cookbooks on CentOS 7.
#
# This handles a number of idiosyncrasies with systemd so it can be 
# run as the root process of the container, making it behave like a 
# normal VM but without the overhead. 

# Because we could use different aws accounts, ecr can differs
# You can set chef_ci_image variable in Manage Jenkins -> Configure System -> Global Properties
ARG chef_ci_image
FROM ${chef_ci_image:-103233932089.dkr.ecr.us-east-1.amazonaws.com/chef_ci}

# Systemd needs to be able to access cgroups
VOLUME /sys/fs/cgroup 

RUN yum -y install \
  crontabs \
  curl \
  initscripts \
  net-tools \
  passwd \
  sudo \
  tar \
  which && \
  yum clean all
