How can I get Chef to run apt-get update before running other recipes
You can include the apt recipe in the very beginning: include_recipe ‘apt’ this will run the update command.
You can include the apt recipe in the very beginning: include_recipe ‘apt’ this will run the update command.
Using multiple package systems is usually a very bad idea, for many reasons. Packages are likely to collide and break and you’ll end up with much greater mess than you’ve started with. See this excellent answer for more detail: Is there a pitfall of using multiple package managers? A more feasible approach would be troubleshooting … Read more
The following worked for me: sudo apt-get install g++
try this out: sudo add-apt-repository -y ppa:webupd8team/java sudo apt-get update echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections sudo apt-get -y install oracle-java7-installer running 3rd and 4th command on my debian 7.1 helps, so I think the same can help on ubuntu as well
This is the solution I ended up going with, and our apps have been running in production without any issues for close to a month with this fix in place: All I had to do was to add –ignore-installed to the pip install lines in my dockerfile that were raising errors. Using the same dockerfile … Read more
This is happening because the apt repository is not yet updated, it is common practice to clean your apt repositories and tmp files after creating an image, which your base image is probably doing. To fix this, you are going to want to run apt-get update prior to installing git, it is good practice to … Read more
Adding a key to /etc/apt/trusted.gpg.d is insecure because it adds the key for all repositories. This is exactly why apt-key had to be deprecated. Short version Do similar to what Signal does. If you want to use the key at https://example.com/EXAMPLE.gpg for a repository listed in /etc/apt/sources.list.d/EXAMPLE.list, use: sudo mkdir -p /etc/apt/keyrings/ wget -O- https://example.com/EXAMPLE.gpg … Read more
As larsks mentions, apk is for Alpine distributions and you selected FROM ubuntu:trusty which is Debian based with the apt-get command. Change your FROM line to FROM alpine:3.4 to switch to the Alpine based image with apk support.
The generated file /etc/resolv.conf is: nameserver 172.24.0.1 ..had to change it to nameserver 8.8.8.8 which resolves the problem