version locked and acepting lisence on install

This commit is contained in:
2022-08-15 14:10:03 +02:00
parent 1e8e9b66bd
commit c9bf8db5f9
4 changed files with 12 additions and 4 deletions

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -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 \