Do not use two methods of syncing time at the same time
Method 1:
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
Mount these inside container so that host and container time are in sync
Method 2:
Pass the TZ environment variable and run the following inside container
$ ln -snf /usr/share/zoneinfo/Europe/Berlin /etc/localtime && echo Europe/Berlin > /etc/timezone
			
			
This commit is contained in:
		| @@ -48,4 +48,4 @@ sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' /etc/bind/named.conf | ||||
| sed -i 's|IMS_DOMAIN|'$IMS_DOMAIN'|g' /etc/bind/named.conf | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -58,7 +58,7 @@ then | ||||
| fi | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|  | ||||
| cp /mnt/fhoss/hss.sh / | ||||
| cd / && ./hss.sh | ||||
| @@ -40,4 +40,4 @@ sed -i 's|MONGO_IP|'$MONGO_IP'|g' install/etc/open5gs/hss.yaml | ||||
| sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' install/etc/open5gs/hss.yaml | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -65,4 +65,4 @@ sed -i 's|ICSCF_IP|'$ICSCF_IP'|g' /etc/kamailio_icscf/icscf.xml | ||||
| sed -i 's|IMS_DOMAIN|'$IMS_DOMAIN'|g' /etc/kamailio_icscf/icscf.xml | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -42,4 +42,4 @@ sed -i 's|PGW_IP|'$PGW_IP'|g' install/etc/open5gs/mme.yaml | ||||
| sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' install/etc/open5gs/mme.yaml | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -27,6 +27,6 @@ | ||||
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|  | ||||
| mongod --smallfiles --dbpath /var/lib/mongodb --logpath /var/log/mongodb/mongodb.log --bind_ip 0.0.0.0 | ||||
|   | ||||
| @@ -38,7 +38,7 @@ while true; do | ||||
| done | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|  | ||||
| # Grant privileges and set max connections | ||||
| mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' identified by 'ims' WITH GRANT OPTION;" | ||||
|   | ||||
| @@ -41,4 +41,4 @@ sed -i 's|IMS_DOMAIN|'$IMS_DOMAIN'|g' install/etc/open5gs/pcrf.yaml | ||||
| sed -i 's|PCSCF_IP|'$PCSCF_IP'|g' install/etc/open5gs/pcrf.yaml | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -74,7 +74,7 @@ sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' /etc/kamailio_pcscf/pcscf.xml | ||||
| sed -i 's|RTPENGINE_IP|'$RTPENGINE_IP'|g' /etc/kamailio_pcscf/kamailio_pcscf.cfg | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|  | ||||
| # Add static route to route traffic back to UE as there is not NATing | ||||
| ip r add 192.168.101.0/24 via ${PGW_IP} | ||||
|   | ||||
| @@ -44,4 +44,4 @@ sed -i 's|EPC_DOMAIN|'$EPC_DOMAIN'|g' install/etc/open5gs/pgw.yaml | ||||
| sed -i 's|PCSCF_IP|'$PCSCF_IP'|g' install/etc/open5gs/pgw.yaml | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -55,7 +55,7 @@ if test "$NO_FALLBACK" = "yes" ; then | ||||
| fi | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|  | ||||
| set +e | ||||
| if [ -e /proc/rtpengine/control ]; then | ||||
|   | ||||
| @@ -69,4 +69,4 @@ sed -i 's|SCSCF_IP|'$SCSCF_IP'|g' /etc/kamailio_scscf/scscf.xml | ||||
| sed -i 's|IMS_DOMAIN|'$IMS_DOMAIN'|g' /etc/kamailio_scscf/scscf.xml | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -33,4 +33,4 @@ sed -i 's|SGW_IF|'$IF_NAME'|g' install/etc/open5gs/sgw.yaml | ||||
| sed -i 's|DOCKER_HOST_IP|'$DOCKER_HOST_IP'|g' install/etc/open5gs/sgw.yaml | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
| @@ -42,4 +42,4 @@ sed -i 's|MME_IP|'$MME_IP'|g' /etc/srslte/enb.conf | ||||
| sed -i 's|ENB_IP|'$ENB_IP'|g' /etc/srslte/enb.conf | ||||
|  | ||||
| # Sync docker time | ||||
| ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
| #ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||||
|   | ||||
		Reference in New Issue
	
	Block a user