= Dockerfile * [[https://docs.docker.com/develop/develop-images/dockerfile_best-practices/]] * mirar: [[https://runnable.com/blog/9-common-dockerfile-mistakes]] == nombre contenedores * [a-zA-Z0-9][a-zA-Z0-9_.-] * max. 30 caracteres * [[https://stackoverflow.com/questions/42642561/docker-restrictions-regarding-naming-container]] == zona horaria * [[linux:bash:zonahoraria|]] * crear volumenes a ''/etc/localtime'', ''/etc/timezone'' para que coincida con el host: volumes: - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" * [[https://serverfault.com/questions/683605/docker-container-time-timezone-will-not-reflect-changes]] * ejecución de comando en **Dockerfile**: ENV TZ 'Europe/Andorra' RUN echo $TZ > /etc/timezone && \ apt-get update && apt-get install -y tzdata && \ rm /etc/localtime && \ ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ dpkg-reconfigure -f noninteractive tzdata && \ apt-get clean == Dockerfile examples {{NEWPAGE>tech:docker:dockerfile:examples}} {{topic>dockerfile&nodate&nouser&sort&tags}}