Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"read-only file system" error when pulling Docker image

I am trying to install Splash for Scrapy.

According to its installation documentation, first of all Docker has to be installed. This has been successfully done.

Then I launch the Docker Quickstart Terminal and I try to follow the second step and pull the image. This is when the issue arrives:

$ docker pull scrapinghub/splash

After pulling, extracting and downloading; I receive the following message:

failed to register layer: Untar re-exec error: exit status 1: output: write /usr/share/fonts/truetype/arphic-bsmi00lp/bsmi00lp.ttf: read-only file system

Attempts

If I follow the documentation from GitHub:

$ docker run -p 8050:8050 scrapinghub/splash

I get the same error:

docker: open /mnt/sda1/var/lib/docker/tmp/GetImageBlob849866419: read-only file system

I also found some other threads talking about similar issues, but I did not find any solution, or at least I did not understand it.

  • Error saving container to disk: read-only file system
  • Read Only Error on yosemite MacOsX
  • docker container filesystem became 'read-only' after running 5 months

I am not familiar with Virtual Machines or Virtual Boxes, so maybe I am just doing a very simple mistake.

Any ideas to solve the problem?

Additional details

$ docker info

Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 0
Server Version: 1.11.2
Storage Driver: aufs
 Root Dir: /mnt/sda1/var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 0
 Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: host bridge null
Kernel Version: 4.4.12-boot2docker
Operating System: Boot2Docker 1.11.2 (TCL 7.1); HEAD : a6645c3 - Wed Jun  1 22:59:51 UTC 2016
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.955 GiB
Name: default
ID: QXKR:FRMB:NMLI:RLSF:K7PT:RXWE:44MP:6NQN:ISFO:GNWR:NBGO:AMNL
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug mode (client): false
Debug mode (server): true
 File Descriptors: 12
 Goroutines: 30
 System Time: 2016-06-10T15:09:55.50550284Z
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
 provider=virtualbox
like image 751
J0ANMM Avatar asked Jun 10 '16 15:06

J0ANMM


People also ask

Is docker image a read/write image or is it a read-only image?

The layers speed up Docker builds while increasing reusability and decreasing disk use. Image layers are also read-only files. Once a container is created, a writable layer is added on top of the unchangeable images, allowing a user to make changes.

Are docker images read-only?

Docker images are stored as series of read-only layers. When we start a container, Docker takes the read-only image and adds a read-write layer on top.

What is Dockerized image?

Dockerizing is the process of packing, deploying, and running applications using Docker containers. Docker is an open source tool that ships your application with all the necessary functionalities as one package.

What is docker default Workdir?

The default is indeed / as stated elsewhere. It is worth mentioning, though, that you will almost never be running from an empty docker image ( FROM scratch ), so the WORKDIR is likely set by the base image you're using.


2 Answers

I cannot give an explanation of what was wrong, but I can explain what I did to make it work:

  1. Restart.
  2. Go through the steps of the documentation again.
like image 117
J0ANMM Avatar answered Oct 14 '22 03:10

J0ANMM


In my case, running docker-machine stop and then docker-machine start solved the problem.

I had to run eval $(docker-machine env) after, but that's it.

like image 45
Vic Seedoubleyew Avatar answered Oct 14 '22 05:10

Vic Seedoubleyew