Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

Failed to remove network for the build, Job failed error: Invalid volume specification: “/cache”

Posted on 17/10/202128/08/2026 Christian By Christian No Comments on Failed to remove network for the build, Job failed error: Invalid volume specification: “/cache”
  1. Home
  2. Containers
  3. Failed to remove network for the build, Job failed error: Invalid volume specification: “/cache”
Docker for Windows

Volumes are the preferred mechanism for persisting data generated by and used by Docker containers. While bind mounts are dependent on the directory structure and OS of the host machine, volumes are completely managed by Docker. Volumes have several advantages over bind mounts. Firstly, volumes are easier to back up or migrate than bind mounts. Kindly refer to some of these related guides: How to install Git on macOS, how to clone a repository and install software from GitHub on Windows, Panic: Failed to register the GitLab-runner, you may be having network issues,

You can manage volumes using Docker CLI commands or the Docker API. Volumes work on both Linux and Windows containers. You can safely share it among multiple containers. Volume drivers let you store volumes on remote hosts or cloud providers.

They also enable you to encrypt the contents of volumes, or to add other functionality. New volumes can have their content pre-populated by a container. Lastly, volumes on Docker Desktop have much higher performance than bind mounts from Mac and Windows hosts.

Overall, volumes provide a powerful way to manage data in your Docker applications. Hence, their performance on Docker Desktop is significantly better than that of bind mounts.

The following error below will be prompted if you are working with the Docker-Windows executor. The GitLab runner needs to be registered with c:\\cache as a source directory, else the following error will be promted when working with a Widnows Container.

Failed to remove network for the build, Job failed error: Invalid volume specification: "/cache"

Solution

Register GitLab-Runner with “c:\\cache” as the source directory. In order to fix the Failed to remove network for the build and Invalid volume specification errors errors above, you will need to edit the config.toml and modify the volume using the Windows File System since we are currently running Windows Container.

Below is an example of the configuration for a simple Docker executor running Windows.

.
.
.
.
image = "mcr.microsoft.com/windows:20H2"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["c:\\cache"]
shm_size = 0

When a runner is registered with c:\\cache as a source directory when passing the --docker-volumes or DOCKER_VOLUMES environment variable, there is a known issue.

I hope you found this blog post helpful in fixing Failed to remove network for the build and Invalid volume specification errors. If you have any questions, please let me know in the comment session.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Containers Tags:docker, docker cli, Docker Desktop, Microsoft Windows, Windows 10, Windows Server 2016

Post navigation

Previous Post: How to manually update Docker desktop
Next Post: How to locate directory file context and restore it with SELinux

Related Posts

  • How to stop remove and manage docker container
    Stopping, Removing and Naming Docker Container Containers
  • Docker OSTypelinux
    The executor requires OSType=windows, but Docker Engine supports only OSType=linux Containers
  • How to configure Azure container register with secured connection with container apps
    Configure Azure Container Registry for a secure connection with Azure Container Apps AWS/Azure/OpenShift
  • Docker ENOENT error
    ENOENT: No such file or directory Error in Docker build Containers
  • OpenShift DR Hero e1784641900398
    Backing Up OpenShift Is Not the Same as Recovering It AWS/Azure/OpenShift
  • GitLabrunner 1 1
    There has been a runner system failure: failed to start the process exec “pwsh” Containers

More Related Articles

portainer feature How to Install Docker Portainer on Linux Containers
gitlabcomplete Install Docker Desktop and register GitLab-Runner with Docker-windows executor Containers
How to configure Azure container register with secured connection with container apps Configure Azure Container Registry for a secure connection with Azure Container Apps AWS/Azure/OpenShift
update Docker desktop How to manually update Docker desktop Containers
Dockerize NodeJS Application Dockerizing a NodeJs Express Application Automation
featurekube How to Install and Use Minikube on a Linux System Containers

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • BitLocker 1
    Unable to install Microsoft Bitlocker Administration: Uninstall your current version of MBAM and run setup again Windows
  • image
    How to find Computer Serial Number stated change to be filled by OEM Windows Server
  • Feature image 1
    Configure and validate Exclusions for Microsoft Defender Antivirus scans Anti-Virus Solution
  • Patch Veeam Backup and Replication to Build 13.0.1.2067 e1779570330754
    Update Veeam Backup & Replication to Build 13.0.1.2067 Backup
  • WSUS Post deployment Configuration Failed
    The schema version of the database is from a newer version of wsus Windows Server
  • How to Enable High Dynamic Range on Windows 11
    How to Enable High Dynamic Range on Windows 11 Windows
  • How to Upgrade Windows 10 with an Unsupported CPU TPM 1.0 to Windows 11
    Upgrading from Windows 10 with Unsupported CPU and TPM 1.0 Windows
  • kerberosdelegation
    Kerberos Delegation: A Comprehensive Guide Web Server

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,747 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.