Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
Installing docker-ce through puppet

Im trying to install docker-ce through puppet and i have a couple of questions.

1: Does apt::key automatically do a 'apt-get update' afterwards?

2: How can i use the apt:ppa module to add the docker-ce repository? this is done with:

sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

But how would i use the apt::ppa to include distribution and release?

This is the whole puppet block:

class docker {

  $prerequisites = ['apt-transport-https', 'ca-certificates', 'curl']
  package { $prerequisites: ensure => installed}

  apt::key { 'docker-ce':
    ensure    => present,
    id        => '9DC858229FC7DD38854AE2D88D81803C0EBFCD88',
    options   => 'https://download.docker.com/linux/ubuntu/gpg',
  }

  apt::ppa {''}

  package {'docker-ce': ensure  => installed}
}

EDIT:

Ended up using the apt module with apt::source, hardcoded release because i know all my systems will run it.

class docker {
  include apt

  $prerequisites = ['apt-transport-https', 'ca-certificates']
  package { $prerequisites: ensure => installed} ->

  apt::key { 'docker-ce':
     ensure    => present,
     id        => '9DC858229FC7DD38854AE2D88D81803C0EBFCD88',
     options   => 'https://download.docker.com/linux/ubuntu/gpg',
  } ->

  apt::source {'docker-ce':
     location  => 'https://download.docker.com/linux/ubuntu',
     release   => 'xenial'
  } ->

  exec { 'apt-get-update':
     command   => '/usr/bin/apt-get update'
  } ->

  package {'docker-ce': ensure  => installed}
}
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Here's how I'm installing this:

  apt::key { '9DC858229FC7DD38854AE2D88D81803C0EBFCD88':
    source => 'https://download.docker.com/linux/ubuntu/gpg',
  } ->
  apt::source { 'docker-ce':
    architecture => 'amd64',
    location     => 'https://download.docker.com/linux/ubuntu',
    repos        => 'stable',
    release      => $::lsbdistcodename,
  } ->
  package { 'docker-ce':
    ensure  => 'latest',
    require => Exec['apt_update'],
  }
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!