31

This is running a Docker Container using the official Ubuntu 14.04 The end result will be the same as this QA once I can get that command installed.

New to Ubuntu and such, trying to get a docker container to update certs that i am linking in using -v.

Tried to use dpkg -S update-ca-certificates as described in the link and a few other answers that seemed to point in the same general direction. but i end up getting this in the container

root@24b087e56f8e:/# apt-get install -y ca-certificates
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ca-certificates

2 Questions

  1. How do you find out what package a command is installed with?

  2. What package do I need to install with my container to get update-ca-certificates working?

workabyte
  • 1,002

4 Answers4

59

PEBKAC

turns out you need to run apt-get update before you can install any other packages. After running the updates you can then apt-get install -y ca-certificates and this is the package that contains the command update-ca-certificates

workabyte
  • 1,002
11

In Ubuntu Docker Container run:

  1. apt-get update

  2. apt-get install ca-certificates -y

  3. update-ca-certificates

Artur Meinild
  • 31,035
0

try use: update-ca-trust, if u have installed ca-certificates but not work. See: https://stackoverflow.com/questions/73620124/update-ca-certificates-command-not-found-despite-ca-certificates-being-installed

0

I am not sure why but when I try the following command:

sudo apt-get install ca-certifications curl gnupg

I received the following error message:

E:Unable to locate package ca-certificates

However, upon running the following command that I found from a docker install tutorial:

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y

Everything runs through smoothly and upon looking at the log it states that ca-certificates is already the newest version.

Not sure why the first command does not state that the package is already installed, but you might try this method.