version locked and acepting lisence on install
This commit is contained in:
@@ -55,12 +55,14 @@ ADD solo.json.erb /var/chef/solo.json.erb
|
||||
|
||||
# Install using chef-solo
|
||||
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN yum install -y --disableplugin=subscription-manager hostname procps \
|
||||
&& curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v 14.12.9 \
|
||||
&& curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
|
||||
&& chef-solo \
|
||||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
|
||||
--json-attributes /var/chef/solo.json \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rm -rf /etc/chef \
|
||||
&& rm -rf /opt/chefdk \
|
||||
|
||||
@@ -54,12 +54,14 @@ ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexu
|
||||
ADD solo.json.erb /var/chef/solo.json.erb
|
||||
|
||||
# Install using chef-solo
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v 14.12.9 \
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
|
||||
&& chef-solo \
|
||||
--node_name nexus_repository_red_hat_docker_build \
|
||||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
|
||||
--json-attributes /var/chef/solo.json \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rpm --rebuilddb \
|
||||
&& rm -rf /etc/chef \
|
||||
|
||||
@@ -54,12 +54,14 @@ ARG NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL="https://github.com/sonatype/chef-nexu
|
||||
ADD solo.json.erb /var/chef/solo.json.erb
|
||||
|
||||
# Install using chef-solo
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash \
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
|
||||
&& chef-solo \
|
||||
--node_name nexus_repository_red_hat_docker_build \
|
||||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
|
||||
--json-attributes /var/chef/solo.json \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rpm --rebuilddb \
|
||||
&& rm -rf /etc/chef \
|
||||
|
||||
@@ -55,12 +55,14 @@ ADD solo.json.erb /var/chef/solo.json.erb
|
||||
|
||||
# Install using chef-solo
|
||||
# Chef version locked to avoid needing to accept the EULA on behalf of whomever builds the image
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v 14.12.9 \
|
||||
ARG CHEF_VERSION=16.17.18
|
||||
RUN curl -L https://omnitruck.chef.io/install.sh | bash -s -- -v ${CHEF_VERSION} \
|
||||
&& /opt/chef/embedded/bin/erb /var/chef/solo.json.erb > /var/chef/solo.json \
|
||||
&& chef-solo \
|
||||
--node_name nexus_repository_red_hat_docker_build \
|
||||
--recipe-url ${NEXUS_REPOSITORY_MANAGER_COOKBOOK_URL} \
|
||||
--json-attributes /var/chef/solo.json \
|
||||
--chef-license=accept \
|
||||
&& rpm -qa *chef* | xargs rpm -e \
|
||||
&& rm -rf /etc/chef \
|
||||
&& rm -rf /opt/chefdk \
|
||||
|
||||
Reference in New Issue
Block a user