jenkins: five .docker inner container vessel modification time jenkins

Foreword

Previous use jenkins run python code and found the execution time and execution time domestic difference of 8 hours, so time needs to be modified for the domestic container timely standards.

View time

Check System Time

date-R

Docker into the interior of the container, the container viewing time

docker exec -it -u -root vessel name / bin / bash

date -R

View container internal system time zone

cat /etc/timezone

Modifying Containers time

Inside the container to create Asia time zone file

echo Asia/Shanghai > /etc/timezone

Exit container, copy the host dates into the container

docker cp /usr/share/zoneinfo/Asia/Shanghai 容器id:/etc/localtime

Jenkins page refresh, time display and domestic agreement.

Guess you like

Origin www.cnblogs.com/liushui0306/p/12529893.html