Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

How not to get a different serial number each time I start my container ?

Open Subhankar2000 opened this issue 3 years ago • 3 comments

I have taken the pre-installed mac OS catalina, but as after every boot from the same container, I am having different serial numbers as a result, I am getting kicked out of my icloud account, is there any way to get a static serial number one which will not change on every boot ?

Subhankar2000 avatar Jan 03 '22 04:01 Subhankar2000

Did you find a solution to this?

mitchellkrogza avatar Apr 01 '22 14:04 mitchellkrogza

yes, I remember it vaguely but I as far I remember, you will need to stop the docker service, go to the folder where the files are stored(you can search using the id), there will be a config file, there you need to edit it, there will be something that generate Random Serial everytime equals true, that you need to make it false

Subhankar2000 avatar Apr 01 '22 16:04 Subhankar2000

yes, I remember it vaguely but I as far I remember, you will need to stop the docker service, go to the folder where the files are stored(you can search using the id), there will be a config file, there you need to edit it, there will be something that generate Random Serial everytime equals true, that you need to make it false

Thanks very much I sorted it out this morning. For others who run into this.

sudo systemctl stop docker
sudo jq . /docker/containers/[FULL-CONTAINER-ID]/config.v2.json > ~/config.v2.json
sudo mv ~/config.v2.json /docker/containers/[FULL-CONTAINER-ID]/config.v2.json
sudo nano /docker/containers/[FULL-CONTAINER-ID]/config.v2.json

Either delete the two following lines in the ENV section or set them to false

     "GENERATE_SPECIFIC=true",
     "GENERATE_UNIQUE=true",

then restart docker

sudo systemctl restart docker

Your serial should now be fixed, confirm this by rebooting the container at least 2 times each time checking the SERIAL and UUID from System Report

mitchellkrogza avatar Apr 02 '22 07:04 mitchellkrogza