Curtin install of docker

I am wanting to run the following with curtin

curl https://get.docker.com | bash

How do I do this?

In /etc/preseeds/ I have the file curtin_userdata_ubuntu_amd64_generic_bionic.

At the end, I have

late_commands:
  maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null']
  docker_01_get_docker: ["sh", "-c", "export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 && export DEBIAN_FRONTEND=noninteractive && curl https://get.docker.com | bash"]

It is not working and yields this output and error:

Command: ['sh', '-c', 'export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 && export DEBIAN_FRONTEND=noninteractive && curl https://get.docker.com | bash']

Exit code: 100
Reason: -
Stdout: % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 13063 100 13063 0 0 44131 0 --:–:-- --:–:-- --:–:-- 43983
# Executing docker install script, commit: 2f4ae48
+ sh -c ‘apt-get update -qq >/dev/null’
+ sh -c ‘apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null’
+ sh -c ‘curl -fsSL “https://download.docker.com/linux/ubuntu/gpg” | apt-key add -qq - >/dev/null’
+ sh -c ‘echo “deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable” > /etc/apt/sources.list.d/docker.list’
+ sh -c ‘apt-get update -qq >/dev/null’
+ ‘[’ -n ‘’ ‘]’
+ sh -c ‘apt-get install -y -qq --no-install-recommends docker-ce >/dev/null’
E: Sub-process /usr/bin/dpkg returned an error code (1)

The following worked:

docker_01_get_docker: ["curtin", "in-target", "--", "sh", "-c", "export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 && export DEBIAN_FRONTEND=noninteractive && curl https://get.docker.com | bash"]

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.