Monday, November 11, 2024
Docker Jenkins

Solusi No such file or directory for /var/lib/docker/overlay2

or

“Solusi No such file or directory for /var/lib/docker/overlay2”

Pengantar

Pesan “No such file or directory” menunjukkan bahwa sistem tidak dapat menemukan file atau direktori yang dimaksud. Jika Anda mengalami masalah ini terkait dengan direktori /var/lib/docker/overlay2, ini bisa disebabkan oleh beberapa hal. Berikut adalah beberapa solusi yang mungkin membantu:

Problem

Error No such file or directory for /var/lib/docker/overlay2 pada docker

$ docker-compose up
Building map
Step 1/2 : FROM golang:onbuild
onbuild: Pulling from library/golang
693502eb7dfb: Already exists
081cd4bfd521: Extracting [==================================================>] 18.54 MB/18.54 MB
5d2dc01312f3: Download complete
fb1a82f32527: Download complete
a977e8d015dd: Download complete
08c0c39ec85a: Download complete
489f1299f3aa: Download complete
b87be4361d1b: Download complete
ERROR: Service 'map' failed to build: failed to register layer: error creating overlay mount to /var/lib/docker/overlay2/e0ae7864b7c2ba8e924255bd704cd9083bad4471a53bd6dff19a77696718c76a/merged: no such file or directory
$ docker build . -t postgres-thrillshare
Sending build context to Docker daemon  21.9 GB
Step 1/5 : FROM postgres:9.6
 ---> 4e18b2c30f8d
Step 2/5 : MAINTAINER Connor Taffe <connor.taffe@apptegy.com>
 ---> Using cache
 ---> 056821cd8af6
Step 3/5 : RUN openssl req -nodes -new -x509 -newkey rsa:4096 -keyout $PGDATA/server.key       -subj "/C=US/ST=Arkansas/L=Little Rock/O=Apptegy/OU=Development/CN=admin.apptegy.dev"       -out $PGDATA/server.crt     && chmod og-rwx $PGDATA/server.key
 ---> Using cache
 ---> a4f25738dc10
Step 4/5 : ENV POSTGRES_USER foo POSTGRES_DB bar POSTGRES_PASSWORD baz
error creating overlay mount to /var/lib/docker/overlay2/4a815bef0022da237ceafb1297b4958d3edbea74de1007ea2b1b864076b6cd5e-init/merged: no such file or directory

Solusi

$ systemctl stop docker
$ umount /var/lib/docker/overlay2
$ rm -rf /var/lib/docker
$ systemctl start docker

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Solusi No such file or directory for /var/lib/docker/overlay2. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

(Visited 55 times, 1 visits today)
Baca Juga :  Install Redis Via Docker

Similar Posts