0

I need to install the Azure Service Fabric SDK on a linux ubuntu VM automatically. The installation requires you to accept an EULA. How would I automate the acceptance of the EULA so it doesn't prompt for this?

Steps:

sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/servicefabric/ trusty main" > /etc/apt/sources.list.d/servicefabric.list'

sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893

sudo apt-get update

sudo apt-get install servicefabricsdkcommon

The last command requires acceptance of the EULA.

On another post, it appears you could maybe use something like:

DEBIAN_FRONTEND=noninteractive apt-get install -y servicefabricsdkcommon

EDIT:

As mentioned in comments by @Elder_Geek, there appears to be a bug that was fixed to solve this issue and it works, however, when I tried to Dockerize this it didn't work. does dbconf-set-selections behave differently in Docker that may prevent it from working?

Dockerfile

FROM microsoft/vsts-agent:ubuntu-16.04-docker-1.11.2-standard
WORKDIR /vsts
RUN sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/servicefabric/ trusty main" > /etc/apt/sources.list.d/servicefabric.list' \
&& sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 \
&& sudo apt-get update -y \
&& sudo apt install debconf-utils
RUN echo "servicefabricsdkcommon servicefabricsdkcommon/accepted-eula-v1 select true" | sudo debconf-set-selections \
&& sudo apt-get -qq -y install servicefabricsdkcommon \
&& sudo /opt/microsoft/sdk/servicefabric/common/sdkcommonsetup.sh 

The EULA still comes up, if I run the command on my docker host it works fine.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.