Docker starter read

docker run -d -p 80:80 docker/getting-started

  • -d – run the container in detached mode (in the background)
  • -p 80:80 – map port 80 of the host to port 80 in the container
  • docker/getting-started – the image to use

Trabajando con un Dockerfile

docker build -t getting-started .

  • -t Final image
  • . dockerfile en el directorio

You can stop and remove a container in a single command by adding the «force» flag to the docker rm command. For example: docker rm -f <the-container-id>

Eventos en Mysql

Con motivo de fin de año, hoy me preguntaba como poder ejecutar algunas sentencias de manera automática específicamente posterior al cambio de año.

Leyendo la documentación me doy cuenta que la solución a la problematica estaba en usar eventos.

SHOW VARIABLES LIKE ‘event%’ // muestra variable realcionado con palabra event

SET GLOBAL event_scheduler = ON; // enciende el proceso de agendador de evento.

CREATE EVENT cambiodefolio
ON SCHEDULE EVERY 1 year STARTS ‘2018-12-27 12:26:01’
ON COMPLETION NOT PRESERVE ENABLE
DO query a ejecutar;

drop event cambiodefolio

SHOW PROCESSLIST