akamai/akamai-docker

Dockerfile for official Akamai's DevOps environment containing CLI packages and useful tools

43

stars

284

commits

Dockerfile

primary language

Sep 10, 2026

updated

README

Akamai Docker Development Environment

master build

Run Akamai command line tools in Docker. See the tutorial for more usage examples.

animated image showing how to purge using the akamai docker purge package

Quickstart

Enter a shell with all the tools (skip to Authentication for a refresher on .edgerc):

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell

Purge a CP code:

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell akamai purge invalidate --cpcode 123456

Purge a CP code (using the slim variant):

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/purge akamai purge invalidate --cpcode 123456

Start a long-running container in the background, and execute commands against:

docker run -d --name akshell -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell sleep infinity
docker exec -it akshell akamai purge invalidate --cpcode 123456

About the images

This project provides images in two flavors:

  • Small, single-tool images. A good choice for integrating exactly what you need in automation.

  • Larger images combining them all (shell). Perfect for experimentation or automation when all-in-one is more convenient.

Variants

RepositoryDocumentation
akamai/shellGitHub
akamai/terraformGitHub
akamai/terraform-cliGitHub
akamai/httpieGitHub
akamai/test-centerGitHub
akamai/sandboxGitHub
akamai/purgeGitHub
akamai/property-managerGitHub
akamai/onboardGitHub
akamai/image-managerGitHub
akamai/jsonnetGitHub
akamai/firewallGitHub
akamai/eaaGitHub
akamai/edgeworkersGitHub
akamai/dnsGitHub
akamai/cpsGitHub
akamai/cloudletsGitHub
akamai/appsecGitHub
akamai/adaptive-accelerationGitHub
akamai/etpGitHub
akamai/gtmGitHub

You can find the list of current Docker images with their current sizes in DockerHub.

All variants use an Alpine Linux base.

The akamai/shell image replaces the previous akamai/akamai-docker image and contains all the other variant images and some additional utilities, including:

  • git
  • vim
  • tree
  • bind-tools
  • jq
  • jsonnet

Tags

We publish two tags for each image:

  • latest. Built when a commit is pushed to master.
  • vX.X.X. Built when a new version is released.

General usage

This section describes how to operate the Docker images. See the detailed usage instructions for each tool linked in the variants table.

Authentication

EdgeGrid is a standard authentication method for most Akamai APIs.

You can obtain the authentication credentials through an API client. Requests to the API are marked with a timestamp and a signature and are executed immediately.

  1. Create authentication credentials.

  2. Place your credentials in an EdgeGrid file ~/.edgerc, in the [default] section.

    [default]
    client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=
    host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net
    access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij
    client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj
    

The following example illustrates how to implement the EdgeGrid authentication. It displays the list of groups using the Akamai CLI Property Manager package (pm is an alias for property-manager and lg is an alias for list-groups):

docker run -it --rm -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell akamai pm lg

Mounting the file read-only (:ro) is also recommended to protect your credentials from corrupting or tampering.

Short-lived container

Good for interactive exploration of APIs.

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell

Note: You can store this command on a shell alias which allows you to start the Akamai Development Environment with a single command like akadev:

alias akadev='docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell'

Long-running container

Good for interactive tools that run commands at regular intervals, like Jenkins pipelines.

Run the container in the background:

docker run -d --name akshell -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell sleep infinity

Then execute commands using docker exec.

docker exec -it akshell akamai purge invalidate --cpcode 123456

You can stop and start this container by running:

docker stop akshell
docker start akshell

One-shot container

Good for occasional interactive use, like ephemeral tool automation.

The example below invalidates a cached image on the Akamai production network (default)

docker run --rm -v $HOME/.edgerc:/root/.edgerc:ro akamai/purge akamai purge invalidate http://www.example.com/logo.png

Image specifics

Some images require special handling in Docker.

Terraform

Because the Docker container will be running with / as the working directory, you can't just mount your configuration and run terraform apply.

The easiest approach is to specify the mount path in the container as an argument to terraform commands:

docker run --rm -v $HOME/.edgerc:/root/.edgerc:ro \
  -v $HOME/terraform-config:/tf:ro \
  akamai/terraform \
    terraform apply /tf

Terraform >=0.13.0

From version 0.13, Terraform requires providers to be declared and pinned to a specific version. The Akamai Docker image bakes in a few commonly-used provider plugins, in addition to the Akamai provider.

You can use the terraform.tf file as a reference if you wish to include these pre-baked plugins in your project.

If those providers are enough for your requirements, then you're all set. If you need more providers, be advised that terraform init will by default install the providers in a folder within the container, which you will lose along with the container.

In that case, you may wish to install them yourself in a location of your choosing. To do this, set the TF_PLUGIN_CACHE_DIR environment variable to the appropriate location. For example:

docker run --rm -v $HOME/.edgerc:/root/.edgerc:ro \
  -v $HOME/terraform-config:/tf:ro \
  -v $HOME/terraform-plugin-cache:/tf-plugins:rw \
  -e TF_PLUGIN_CACHE_DIR=/tf-plugins \
  akamai/terraform \
    terraform init /tf

HTTPie

When using HTTPie non-interactively in Docker (without -it), you may wish to read the Scripting best practices section of the documentation.

Sandbox

Assuming you run a webserver locally on port 5000 and the sandbox is exposed on port 9550:

  • Ensure you run docker with port mapping.

    docker run -it -p 9550:9550 --name mylab akamai/akamai-docker
    
  • Set up the sandbox client to listen on address 0.0.0.0.

    "sandboxServerInfo": {
      "secure": false,
      "port": 9550,
      "host": "0.0.0.0"
    },
    
  • Set up origin mapping using a special docker hostname.

    "originMappings": [
      {
        "from": "",
        "to": {
          "secure": false,
          "port": 5000,
          "host": "host.docker.internal"
        }
      }
    ],
    

Non-interactive sandbox

The above use case assumes that you start bash sessions and invoke commands inside of it. However, it's also possible to use this Docker image to execute commands straight. For example:

docker run -it --rm -p 9550:9550 -v $HOME/.edgerc:/root/.edgerc -v $(pwd)/sandbox:/cli/.akamai-cli/cache/sandbox-cli akamai/akamai-docker akamai sandbox list

This produces the following output:

Local sandboxes:

current  name      sandbox_id
-------  --------  ------------------------------------
YES      jsmith    12345678-901-2345-6789-012345678901

This way, the container is immediately removed when the execution is complete. You can use a path mount, like in the example above, to persist state across multiple command invocations. The example above stores sandbox-cli local data in $(pwd)/sandbox subfolder so it's possible to operate on the same sandbox in a single bash session.

Build

The build system is described in docs/BUILD.md.

Tutorial

You can find further usage examples in docs/TUTORIAL.md.

Contribution

By submitting a contribution (the “Contribution”) to this project, and for good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, you (the “Assignor”) irrevocably convey, transfer, and assign the Contribution to the owner of the repository (the “Assignee”), and the Assignee hereby accepts, all of your right, title, and interest in and to the Contribution along with all associated copyrights, copyright registrations, and/or applications for registration and all issuances, extensions and renewals thereof (collectively, the “Assigned Copyrights”). You also assign all of your rights of any kind whatsoever accruing under the Assigned Copyrights provided by applicable law of any jurisdiction, by international treaties and conventions and otherwise throughout the world.

License

Copyright © 2026 Akamai Technologies, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributors

wzagrajcz

58 commits

mgwoj

57 commits

ynohat

37 commits

lukaszczerpak

22 commits

akamai/akamai-docker

Dockerfile for official Akamai's DevOps environment containing CLI packages and useful tools

43

stars

284

commits

Dockerfile

primary language

Sep 10, 2026

updated

README

Akamai Docker Development Environment

master build

Run Akamai command line tools in Docker. See the tutorial for more usage examples.

animated image showing how to purge using the akamai docker purge package

Quickstart

Enter a shell with all the tools (skip to Authentication for a refresher on .edgerc):

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell

Purge a CP code:

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell akamai purge invalidate --cpcode 123456

Purge a CP code (using the slim variant):

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/purge akamai purge invalidate --cpcode 123456

Start a long-running container in the background, and execute commands against:

docker run -d --name akshell -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell sleep infinity
docker exec -it akshell akamai purge invalidate --cpcode 123456

About the images

This project provides images in two flavors:

  • Small, single-tool images. A good choice for integrating exactly what you need in automation.

  • Larger images combining them all (shell). Perfect for experimentation or automation when all-in-one is more convenient.

Variants

RepositoryDocumentation
akamai/shellGitHub
akamai/terraformGitHub
akamai/terraform-cliGitHub
akamai/httpieGitHub
akamai/test-centerGitHub
akamai/sandboxGitHub
akamai/purgeGitHub
akamai/property-managerGitHub
akamai/onboardGitHub
akamai/image-managerGitHub
akamai/jsonnetGitHub
akamai/firewallGitHub
akamai/eaaGitHub
akamai/edgeworkersGitHub
akamai/dnsGitHub
akamai/cpsGitHub
akamai/cloudletsGitHub
akamai/appsecGitHub
akamai/adaptive-accelerationGitHub
akamai/etpGitHub
akamai/gtmGitHub

You can find the list of current Docker images with their current sizes in DockerHub.

All variants use an Alpine Linux base.

The akamai/shell image replaces the previous akamai/akamai-docker image and contains all the other variant images and some additional utilities, including:

  • git
  • vim
  • tree
  • bind-tools
  • jq
  • jsonnet

Tags

We publish two tags for each image:

  • latest. Built when a commit is pushed to master.
  • vX.X.X. Built when a new version is released.

General usage

This section describes how to operate the Docker images. See the detailed usage instructions for each tool linked in the variants table.

Authentication

EdgeGrid is a standard authentication method for most Akamai APIs.

You can obtain the authentication credentials through an API client. Requests to the API are marked with a timestamp and a signature and are executed immediately.

  1. Create authentication credentials.

  2. Place your credentials in an EdgeGrid file ~/.edgerc, in the [default] section.

    [default]
    client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=
    host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net
    access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij
    client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj
    

The following example illustrates how to implement the EdgeGrid authentication. It displays the list of groups using the Akamai CLI Property Manager package (pm is an alias for property-manager and lg is an alias for list-groups):

docker run -it --rm -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell akamai pm lg

Mounting the file read-only (:ro) is also recommended to protect your credentials from corrupting or tampering.

Short-lived container

Good for interactive exploration of APIs.

docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell

Note: You can store this command on a shell alias which allows you to start the Akamai Development Environment with a single command like akadev:

alias akadev='docker run --rm -it -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell'

Long-running container

Good for interactive tools that run commands at regular intervals, like Jenkins pipelines.

Run the container in the background:

docker run -d --name akshell -v $HOME/.edgerc:/root/.edgerc:ro akamai/shell sleep infinity

Then execute commands using docker exec.

docker exec -it akshell akamai purge invalidate --cpcode 123456

You can stop and start this container by running:

docker stop akshell
docker start akshell

One-shot container

Good for occasional interactive use, like ephemeral tool automation.

The example below invalidates a cached image on the Akamai production network (default)

docker run --rm -v $HOME/.edgerc:/root/.edgerc:ro akamai/purge akamai purge invalidate http://www.example.com/logo.png

Image specifics

Some images require special handling in Docker.

Terraform

Because the Docker container will be running with / as the working directory, you can't just mount your configuration and run terraform apply.

The easiest approach is to specify the mount path in the container as an argument to terraform commands:

docker run --rm -v $HOME/.edgerc:/root/.edgerc:ro \
  -v $HOME/terraform-config:/tf:ro \
  akamai/terraform \
    terraform apply /tf

Terraform >=0.13.0

From version 0.13, Terraform requires providers to be declared and pinned to a specific version. The Akamai Docker image bakes in a few commonly-used provider plugins, in addition to the Akamai provider.

You can use the terraform.tf file as a reference if you wish to include these pre-baked plugins in your project.

If those providers are enough for your requirements, then you're all set. If you need more providers, be advised that terraform init will by default install the providers in a folder within the container, which you will lose along with the container.

In that case, you may wish to install them yourself in a location of your choosing. To do this, set the TF_PLUGIN_CACHE_DIR environment variable to the appropriate location. For example:

docker run --rm -v $HOME/.edgerc:/root/.edgerc:ro \
  -v $HOME/terraform-config:/tf:ro \
  -v $HOME/terraform-plugin-cache:/tf-plugins:rw \
  -e TF_PLUGIN_CACHE_DIR=/tf-plugins \
  akamai/terraform \
    terraform init /tf

HTTPie

When using HTTPie non-interactively in Docker (without -it), you may wish to read the Scripting best practices section of the documentation.

Sandbox

Assuming you run a webserver locally on port 5000 and the sandbox is exposed on port 9550:

  • Ensure you run docker with port mapping.

    docker run -it -p 9550:9550 --name mylab akamai/akamai-docker
    
  • Set up the sandbox client to listen on address 0.0.0.0.

    "sandboxServerInfo": {
      "secure": false,
      "port": 9550,
      "host": "0.0.0.0"
    },
    
  • Set up origin mapping using a special docker hostname.

    "originMappings": [
      {
        "from": "",
        "to": {
          "secure": false,
          "port": 5000,
          "host": "host.docker.internal"
        }
      }
    ],
    

Non-interactive sandbox

The above use case assumes that you start bash sessions and invoke commands inside of it. However, it's also possible to use this Docker image to execute commands straight. For example:

docker run -it --rm -p 9550:9550 -v $HOME/.edgerc:/root/.edgerc -v $(pwd)/sandbox:/cli/.akamai-cli/cache/sandbox-cli akamai/akamai-docker akamai sandbox list

This produces the following output:

Local sandboxes:

current  name      sandbox_id
-------  --------  ------------------------------------
YES      jsmith    12345678-901-2345-6789-012345678901

This way, the container is immediately removed when the execution is complete. You can use a path mount, like in the example above, to persist state across multiple command invocations. The example above stores sandbox-cli local data in $(pwd)/sandbox subfolder so it's possible to operate on the same sandbox in a single bash session.

Build

The build system is described in docs/BUILD.md.

Tutorial

You can find further usage examples in docs/TUTORIAL.md.

Contribution

By submitting a contribution (the “Contribution”) to this project, and for good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, you (the “Assignor”) irrevocably convey, transfer, and assign the Contribution to the owner of the repository (the “Assignee”), and the Assignee hereby accepts, all of your right, title, and interest in and to the Contribution along with all associated copyrights, copyright registrations, and/or applications for registration and all issuances, extensions and renewals thereof (collectively, the “Assigned Copyrights”). You also assign all of your rights of any kind whatsoever accruing under the Assigned Copyrights provided by applicable law of any jurisdiction, by international treaties and conventions and otherwise throughout the world.

License

Copyright © 2026 Akamai Technologies, Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use these files except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributors

wzagrajcz

58 commits

mgwoj

57 commits

ynohat

37 commits

lukaszczerpak

22 commits

Languages

Dockerfile

57.1%

Shell

28.2%

Python

14.1%