-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (21 loc) · 875 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM jrwesolo/centos-with-chef:6
RUN yum install -y \
wget \
git \
tar \
tree \
vim
RUN wget -q https://opscode-omnibus-packages.s3.amazonaws.com/el/6/x86_64/chefdk-0.5.1-1.el6.x86_64.rpm && \
rpm -Uvh chefdk-0.5.1-1.el6.x86_64.rpm && \
rm chefdk-0.5.1-1.el6.x86_64.rpm
#RUN chef verify
RUN echo 'eval "$(chef shell-init bash)"' >> ~/.bashrc
WORKDIR /root
RUN chef generate repo chef-repo
RUN mkdir -p ~/chef-repo/.chef
RUN echo '.chef' >> ~/chef-repo/.gitignore
COPY conf/knife.rb /root/chef-repo/.chef/
WORKDIR /root/chef-repo
RUN echo -e 'echo Getting keys ...\ncurl -k https://chef-server:4443/knife_admin_key.tar.gz | tar xz -C /root/chef-repo/.chef/' >> ~/.bashrc
RUN echo -e 'echo Running: knife ssl fetch\nknife ssl fetch && knife ssl check' >> ~/.bashrc
RUN echo -e 'echo Initial kitchen config\nkitchen init --driver=docker' >> ~/.bashrc