github.com/darmach/terratest@v0.34.8-0.20210517103231-80931f95e3ff/test-docker-images/gruntwork-centos-test/Dockerfile (about) 1 FROM centos/systemd:latest 2 3 # Reduce Docker image size per https://blog.replicated.com/refactoring-a-dockerfile-for-image-size/ 4 # - perl-Digest-SHA: installs shasum 5 RUN yum update -y && \ 6 yum upgrade -y && \ 7 yum install -y epel-release && \ 8 yum install -y \ 9 bind-utils \ 10 perl-Digest-SHA \ 11 python-pip \ 12 rsyslog \ 13 sudo \ 14 vim \ 15 wget && \ 16 yum clean all && rm -rf /var/cache/yum 17 18 # Install jq. Oddly, there's no RPM for jq, so we install the binary directly. https://serverfault.com/a/768061/199943 19 RUN wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 && \ 20 chmod +x ./jq && \ 21 cp jq /usr/bin 22 23 # Install the AWS CLI per https://docs.aws.amazon.com/cli/latest/userguide/installing.html. 24 RUN pip install --upgrade pip && \ 25 pip install --upgrade setuptools && \ 26 pip install awscli --upgrade 27 28 # Install the latest version of Docker, Consumer Edition 29 RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \ 30 yum -y install docker-ce && \ 31 yum clean all 32 33 # We run systemd as our container process. Systemd can spawn other forks as necessary to help us simulate a real-world 34 # CentOS systemd environment. 35 CMD ["/usr/sbin/init"] 36 37 # NOTE! This Docker container should be run with the following runtime options to ensure that systemd works correctly: 38 # Although this bind-mounted volume would appear at first glance not to work on MacOS or Windows, because those OSs are 39 # running a VM to execute Docker and only a limited set of paths are mounted directly from the host, Docker is able to 40 # use the Linux VM's privileges to execute systemd correctly. 41 # 42 # docker run -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro gruntwork/centos-test