Docker – Arrancar contenedor automáticamente
Para arrancar automáticamente un contenedor cuando se inicie Docker (cuando se encienda el sistema):
docker update --restart=always <contenedor>
Para arrancar automáticamente un contenedor cuando se inicie Docker (cuando se encienda el sistema):
docker update --restart=always <contenedor>
Al intentar arrancar el demonio docker consystemctl start docker obtenía este error: Failed to start Docker Application Container Engine Para solucionarlo: sudo rm /etc/docker/daemon.json
Para que el contenedor docker no se arranque antes de tener montadas las unidades nfs se hace lo siguiente: sudo systemctl edit docker.service (o sudo vi /etc/systemd/system/docker.service.d/override.conf) Añadir las siguientes líneas: ### Anything between here and the comment below will become the new contents of the file [Service] RequiresMountsFor=/mnt/montaje1 /mnt/montaje2 ### Lines below this comment…
Si se quiere generar un war se añade en el pom.xml: <packaging>war</packaging>
Ver la versión de la imagen actual docker images Vemos cuál es la imagen que queremos actualizar: docker inspect b92504dbe48c | grep version Descargar la última versión docker pull ghcr.io/benphelps/homepage:latest Parar y borrar los contenedores asociados docker ps docker stop e6c92a13c04f docker rm e6c92a13c04f Borrar la imagen anterior docker rmi b92504dbe48c Crear y ejecutar el…
find . -name "*.jar" |xargs grep -il NombreClase
find -type f -exec grep -l "texto_busqueda" {} + y si queremos que la búsqueda sea exacta (por palabras) find -type f -exec grep -lw "texto_busqueda" {} +