Il mio rebuild è fallito a causa della mancanza di spazio su disco, quindi devo liberare spazio. Ma sono bloccato in un ciclo: ./launcher cleanup libera spazio sufficiente per superare i 5 GB. Quindi avvio un rebuild, ma questo riempie nuovamente lo spazio recuperato, causando il fallimento del completamento. Vedi sotto.
Come faccio a far ripartire tutto?
$ sudo ./launcher cleanup
Il seguente comando:
- Eliminerà tutte le immagini Docker per i container vecchi
- Eliminerà tutti i container fermi e orfani
Sei sicuro (Y/n):
Inizio della pulizia (byte liberi: 3931580)
Fine della pulizia (byte liberi: 5903356)
$ sudo ./launcher rebuild app
ATTENZIONE: Docker versione 17.05.0-ce deprecata, si consiglia l'aggiornamento alla 17.06.2 o superiore.
ATTENZIONE: Stiamo per iniziare il download dell'immagine base di Discourse
Questo processo potrebbe richiedere da pochi minuti a un'ora, a seconda della velocità della tua rete
Si prega di attendere
Impossibile trovare l'immagine 'discourse/base:2.0.20180802' localmente
2.0.20180802: Pulling from discourse/base
8ee29e426c26: Pulling fs layer
6e83b260b73b: Pulling fs layer
e26b65fd1143: Pulling fs layer
40dca07f8222: Pulling fs layer
b420ae9e10b3: Pulling fs layer
b89ccfe9dadc: Pulling fs layer
40dca07f8222: Waiting
b420ae9e10b3: Waiting
b89ccfe9dadc: Waiting
e26b65fd1143: Verifying Checksum
e26b65fd1143: Download complete
6e83b260b73b: Verifying Checksum
6e83b260b73b: Download complete
b420ae9e10b3: Verifying Checksum
b420ae9e10b3: Download complete
40dca07f8222: Verifying Checksum
40dca07f8222: Download complete
8ee29e426c26: Verifying Checksum
8ee29e426c26: Download complete
8ee29e426c26: Pull complete
6e83b260b73b: Pull complete
e26b65fd1143: Pull complete
40dca07f8222: Pull complete
b420ae9e10b3: Pull complete
b89ccfe9dadc: Verifying Checksum
b89ccfe9dadc: Download complete
b89ccfe9dadc: Pull complete
Digest: sha256:be738714169c78e371f93bfa1079f750475b0910567d4f86fa50d6e66910b656
Stato: Immagine scaricata per discourse/base:2.0.20180802
Hai meno di 5 GB di spazio libero sul disco dove si trova /var/lib/docker. Ti serve più spazio per continuare
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg-lv_root 19G 14G 3.8G 79% /
Vuoi tentare di recuperare spazio pulendo le immagini e i container Docker nel sistema? (y/N)y
ATTENZIONE! Questo rimuoverà:
- tutti i container fermi
- tutti i volumi non utilizzati da almeno un container
- tutte le reti non utilizzate da almeno un container
- tutte le immagini dangling
Sei sicuro di voler continuare? [y/N] y
Spazio totale recuperato: 0B
Se la pulizia è andata a buon fine, puoi riprovare ora
$
Clean up some more space so that the build has enough breathing room to complete. I find that Docker’s cleanup system is not wonderful at purging old images sometimes, so I sometimes have to do a docker images followed by a long docker rmi <ID> <ID> <ID> ....
Anything not in use by a running container is usually safe enough, as far as Discourse is concerned, because it’ll be re-downloaded and/or rebuilt when you do the needful. There’s not a huge pile of images there, though; it’s probably time for you to get a disk upgrade.
Is there any way I can stop it from downloading the latest discourse base image every time I try to rebuild or start the app? I’d like it to just use the old one for now so that I can go to bed…
It only downloads it if it is not on local, we really only download an image once. We only bump the required image once every few months in launcher. There are ways to specify a base image BUT you do not want to do that for a rainbow of reasons.
But when I try to rebuild or start the app, the base images that was presumably deleted by cleanup gets downloaded again and I’m back to where I started.
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1fba0860cbc3 local_discourse/web_only "/sbin/boot" 5 months ago Up 29 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp web_only
aa6b422d88ca local_discourse/data "/sbin/boot" 8 months ago Up 29 minutes data
2940a1603151 local_discourse/mail-receiver "/sbin/boot" 8 months ago Up 29 minutes 0.0.0.0:25->25/tcp mail-receiver
What do you mean by that? Will I need a discourse backup? Cause I don’t have one…