I recently went through the process of building a dockerfile from scratch. I wont get into the details of that process but I did come across an error when trying to publish my package to GitHub Packages.
I tried to do a sudo docker push docker.pkg.github.com/mookyd/mymooky/mymooky:latest (my repo) and was thrown the error:
unauthorized: Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Its pretty clear what needed to happen but I thought my credentials would be enough since I wasnt using a script per se. I used docker login and provided my username and password and tried the command again. Same error.
After doing some reading, I discovered that you need to pass a “Personal Access Token” as a password. I generated a PAT under Settings–> Developer Settings –> Personal Access Tokens. I gave the token the access to the repo and to read and write packages. I then used docker login and passed the token string to login. After that, I was able to use docker push to upload my image.
I recently needed a small lab environment to sharpen my Kubernetes skills. I setup Minikube on an Ubuntu VM running 18.04.4 LTS (bionic). This VM was created on my Windows Desktop in VirtualBox. Confused yet? Some of the commands can leave your environment insecure so do not do this in your Production Internet facing environment.
To get started, I downloaded and installed VirtualBox onto my Windows PC. I then created an Ubuntu 18.04 VM and make sure the number of vCPUs on your VM is greater than or equal to 2.
First step is to update your VM.
- sudo apt-get install apt-transport-https (if using 1.4 or earlier)
Install VirtualBox on your Ubuntu VM
- sudo apt install virtualbox virtualbox-ext-pack
- wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
Make it executable
- sudo chmod +x minikube-linux-amd64
Move it so its in path
- sudo mv minikube-linux-amd64 /usr/local/bin/minikube
- curl -LO https://storage.googleapis.com/kubernetes-release/release/
curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt/bin/linux/amd64/kubectl
Make it executable
- sudo mv ./kubectl /usr/local/bin/kubectl
Check that its working properly
I received an error saying docker wasn’t in $PATH. You may or may not see this error.
- curl -fsSL https://get.docker.com/ | sh
- sudo minikube start –vm-driver=virtualbox
Start the Kubernetes Dashboard
- minikube dashboard
- minikube dashboard –url
If you want to view the dashboard remotely, you will need to run the following commands:
- sudo kubectl proxy –address=’0.0.0.0′ –disable-filter=true
You will get a message saying “Starting to serve on [::]:8001”
Hopefully this helps. If you get stuck or have a way to optimize this, please comment below.
Kudos to https://computingforgeeks.com/how-to-install-minikube-on-ubuntu-18-04/ for helping me get started.