Skip to content Skip to sidebar Skip to footer

Error Building Docker Image 'executor Failed Running [/bin/sh -c Apt-get -y Update]'

I'm trying to build a docker image but it throws an error and I can't seem to figure out why. It is stuck at RUN apt-get -y update with the following error messages: 4.436 E: Relea

Solution 1:

It's answered here https://askubuntu.com/questions/1059217/getting-release-is-not-valid-yet-while-updating-ubuntu-docker-container

Correct your system clock. (in comments I also suggested checking for a mismatch between clock and your timezone too)


Solution 2:

In my case, docker was still using the cached RUN apt update && apt upgrade command, thus not updating the package sources.

The solution was to build the docker image once with the --no-cache flag:

docker build --no-cache .

Solution 3:

If you are using docker desktop, please check if enough resources are set in settings/preferences. Eg. memory and disk requirement


Solution 4:

This happens specific to OS also.

I had same issues running MariaDB on my Windows 10.

Check for Docker Settings:

{
  "registry-mirrors": [],
  "insecure-registries": [],
  "debug": false,
  "experimental": false,
  "features": {
    "buildkit": true
  },
  "builder": {
    "gc": {
      "enabled": true,
      "defaultKeepStorage": "20GB"
    }
  }
}

Remove below block, and it should work:

"features": {
    "buildkit": true
  },

Solution 5:

I get this ERROR: executor failed running [...]: exit code: 100 error message when I mistyped the name of a package.

This was in my Dockerfile:

RUN sudo apt-get update; \
    sudo apt-get -y upgrade; \
    sudo apt-get install -y gnupg2 wget lsb_release 

instead of this:

RUN sudo apt-get update; \
    sudo apt-get -y upgrade; \
    sudo apt-get install -y gnupg2 wget lsb-release 

(see the difference between the underscore and the dash.)

Fixing the package name solved the problem.


Post a Comment for "Error Building Docker Image 'executor Failed Running [/bin/sh -c Apt-get -y Update]'"