Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

README.md

dind-azurecli

Fork of Docker in Docker (petazzo/dind), with Azure-cli installed.

Here is a 2 minute YouTube video with instructions on how to set this up.

You MUST run this in privileged mode. JPetazzo explains why in this blog post.

docker run -it --privileged -u root -v /var/run/docker.sock:/var/run/docker.sock davevoyles/dind-azurecli sh

The -v /var/run/docker.sock:/var/run/docker.sock command mounts the socket of the EXTERNAL container to that of the INTERNAL container, so that you now have a shell inside of the container to run commands.

If you see all of this log info below, then you've stood up the outer Docker container.

Docker Readme Two

Access the internal docker container

Now open a new terminal window to access the internal docker container.

Run Docker ps to list out the currently running docker images. Copy the ID# of the image we just ran. Test out the azure CLI with a simple az command:

docker exec -it <ID# of image> az -h

Now you have access to the Azure CLI from within the internal docker container!

Docker Readme One

Using the Azure CLI to build containers

As an example, you can run the following command to:

  1. Build the react-boilerplate image from the code4clouds Azure Container Registry
  2. Log into an Azure Service Principal. You can read more about those here.
  3. Push that image to the Azure Container Registry
docker build --tag registryXYZ.azurecr.io/code4clouds/react-boilerplate:1.0 .
az login --service-principal --username $ACRUSERNAME --password $ACRPASSWORD --tenant $ACRTENANT --allow-no-subscription
az acr login --name registryXYZ
docker push registryXYZ.azurecr.io/code4clouds/react-boilerplate:1.0'

Obviously you'd swap the user name, password, tenant and repository to match that of your own.

Resources

About

Fork of Docker in Docker (petazzo/dind), with Azure-cli installed.

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.