fabikd commented on code in PR #7250: URL: https://github.com/apache/trafficcontrol/pull/7250#discussion_r1048841425
########## infrastructure/cdn-in-a-box/README.md: ########## @@ -182,3 +182,33 @@ Try disabling SELinux or setting it to 'permissive'. SELinux hates letting conta ### Traffic Vault container exits with cp /usr/local/share/ca-certificates cp: missing destination Bring all components down, remove the `traffic_ops/ca` directory, and delete the volumes with `docker volume prune`. This will force the regeneration of the certificates. + +## Notes for Apple M1 Pro Configuration + +### Code edits in the cdn-in-a-box directory + +Re/installed docker from the command line to use user=[your username] flag, and update the dockerfiles in the code for both enroller and traffic_ops in the cdn-in-a-box folder with the correct architecture for the M1. Link to install info for docker: https://docs.docker.com/desktop/install/mac-install/ and use Install from command line. + +- Then update cdn-in-a-box/traffic_ops Dockerfile line 46 to -aarch64/pgdg-redhat-repo-latest.noarch.rpm after EL-${RHEL_VERSION%%.*} +- Add on line 18 of the cdn-in-a-box/enroller Dockerfile --platform=linux/amd64 after the 1st FROM. + +Build and run of it: +In the trafficcontrol/infrastructure/cdn-in-a-box directory run the following: + +- make build-builders ~~> this will create all the rpms and copy each rpms into its own folder in the cdn-in-a-box project. This will also create the dist folder under trafficcontrol folder structure even if you deleted yours. + +- docker-compose up ~~> this will create docker images, and if rebuild is needed, run docker-compose up --build. + +### Docker v4.11 and later of Docker Desktop for Mac + +"Privileged configurations are applied during the installation with the --user flag on the install command. In this case, the user is not prompted to grant root privileges on the first run of Docker Desktop. Specifically, the --user flag: + +- Uninstalls the previous com.docker.vmnetd if present +- Sets up symlinks for the user +- Ensures that localhost is resolved to 127.0.0.1 + +The limitation of this approach is that Docker Desktop can only be run by one user account per machine, namely the one specified in the -–user flag." + +The above is a direct quote found in Installing from the commandline: https://docs.docker.com/desktop/mac/permission-requirements/ + +Note: The homebrew install did not work, neither did the Docker.dmg none command line install. Review Comment: I'm sorry, I meant that the command-line install is the only one that did work. I will fix it to make it clear. (: Also, because this was the reason my docker containers were not loading in localhost host and this also fixed it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
