I am assuming you already have a docker image that you now want to move to another host. In this example I have two web server containers I want to move called web1 and web2.
Now we can to export image web1 to a file. This is simple using docker save -o web1.image However, if we pipe the output to bzip2 we can reduce the size of this image significantly. In the image below you can see I have gone from 125mb to 42mb in size. docker save web1 | bzip2 > web1.image.bz2 not a bad reduction especially if you are moving larger images over smaller pipes.
Now you can scp the file to the remote host and then load the image into your remote docker instance. Docker supports compressed files so you don’t have to extract the bz image file. docker load < web1.image.bz2 Next simply run your image. In this example I giving the container a name “web1”, running it in daemon mode on port 8081 which connects to port 80 on the actual container. The last web1 argument is the name of the image file. docker run --name web1 -d -p 8081:80 web1
Now that you see the steps we can condense these into one command which hopefully looks less like magic now and more like a neat shortcut. docker save web2 | bzip2 | ssh user@remotehost 'bunzip2 | docker load; docker run -d -p 8082:80 web2‘
Wanting to test out a sample API app from swagger.io using golang on CentOS7 and found the simple start not so simple. The short answer is that is required git to pull the required packages from github to compile the program.
This host was a fairly new CentOS7 host with very few installed packages. I wanted to work with the pets api sample from swagger.io using golang. But as you can see below it failed to launch.
So I tried to install gorilla/mux directly and noticed that it was not able to pull the package from github. This made me wonder if I had git installed, I did not. Simple solution simple fix?
sudo yum install git -y
Yes, simple fix, after that it was really simple again.
This week it seemed like the screen time controls I had in place were not working as expected. The phone I provided to my son was supposed to limit his screen time to about 2.5 hours a day but it sure felt like he had gone over that limit.
I checked went to check what sort of time reporting I had for his phone and noticed that it seemed to show very little detail, in fact, it seemed to have stopped reporting anything in the past week.
I could see this by going to Settings -> Screen Time -> selecting his name and looking under the daily average. It showed the last update date as a week prior and a small circle was spinning as if to tell me it was trying to update.
The solution was to toggle the “Ask to Buy” option found under Settings -> My name (top of the screen) -> Family Sharing -> His name (under Family Members) -> Ask To Buy. Here disable the option, go back once, return and re-enable the option. Once enabled his phone immediately got a message saying that Screen time was enabled. I also saw an update on for his screen time usage. As expected on a few days it had gone past the 2.5-hour limit. Now that it is enabled we will see how well it works.
I have recently provided my son with an iPhone and in the process enabled some of the typical parental controls. In addition during the setup, I skipped over the Face ID setup assuming it would be simple to complete later and it should be his face and not mine used for this feature.
Anyway, later when trying to find the Face ID option it appeared to be missing. I could find the section for Face ID but nothing about setup or resetting this feature. The issue is based on if you allow your child the ability “Passcode Changes”. When this feature is disabled the menu item on your child’s phone for “FaceID and Passcode” will be removed.
So, on your phone go to Settings -> Screen Time -> Content & Privacy Restrictions -> Passcode Changes. Here select either Allow (FaceID and Passcode will show) or Don’t Allow (FaceID and Passcode will NOT show).
It is also worth noting that you can now have more than one FaceID assigned to the phone. So, I could have set up FaceID with my image to start with but I still would have had this issue later when he tried to add his own image to FaceID.