So I wanted to install some stuff through apt-get and it crashed. It was a dependency issue. Thus, I executed
And it crashed. Seemingly, the internal clock was out of sync.
Attemtped to use the fix propted in the readme (but for the docker image):
sudo date -s "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')"
Permission denied...
After doing some research, my fix was
1. Stopping the docker container
2. Stashing a copy somewhere else
docker commit devops199 my_temporary_image
3. Making sure my local machine's clock was set properly
Because the docker image inherits the time from the machine
4. Deleting the old image
5. Re-running the image
docker run -it -d --name devops199 -e TZ=MyTimeZone my_temporary_image
Replace MyTimeZone by the appropriate one (i.e. America/New_York, Europe/Madrid ...).
The bad thing about this fix is that now I have some space occupied by my_temporary_image:
yields
REPOSITORY TAG IMAGE ID CREATED SIZE
my_temporary_image latest 3a9438defdaf 2 hours ago 5.7GB
whitehat-machine latest 82d98c925275 2 months ago 2.65GB
So I wanted to install some stuff through
apt-getand it crashed. It was a dependency issue. Thus, I executedAnd it crashed. Seemingly, the internal clock was out of sync.
Attemtped to use the fix propted in the readme (but for the docker image):
sudo date -s "$(curl -s --head http://google.com | grep ^Date: | sed 's/Date: //g')"Permission denied...
After doing some research, my fix was
1. Stopping the docker container
2. Stashing a copy somewhere else
3. Making sure my local machine's clock was set properly
Because the docker image inherits the time from the machine
4. Deleting the old image
5. Re-running the image
Replace
MyTimeZoneby the appropriate one (i.e.America/New_York,Europe/Madrid...).The bad thing about this fix is that now I have some space occupied by
my_temporary_image:yields