Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Containers » Failed to remove network for the build, Job failed error: Invalid volume specification: “/cache”
  • 1 8y62mmvjlr 5uovgoq6zmq
    How to download and install DriveLock on Windows Security | Vulnerability Scans and Assessment
  • Veeam
    Install and configure Veeam Backup and Replication Community Edition Backup
  • Feature image Audio settings
    Master Your Sound Experience: How to Manage Audio Settings on Windows 11 Windows
  • LAPs on Windows Part of the OS
    How to configure Windows LAPS Windows
  • asdfgh
    All Group Policies (GPO) available to configure Microsoft Edge settings Windows Server
  • 1 WeXxkEX0JG3oB781HD8Hrg 1
    Command Prompt in Windows: Creating Volumes Guide Windows
  • HYBRID BENEFITS FEATURE
    Azure Hybrid Use Cases and Benefits AWS/Azure/OpenShift
  • xvy
    Fix Error 0xc1420127: The specified image in the specified wim is already mounted for read and write access Windows Server

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

Posted on 17/10/202129/09/2023 Christian By Christian No Comments on 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. 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. 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,

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.

Rate this post

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

  • Click to share on X (Opens in new window) X
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Telegram (Opens in new window) Telegram
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on Bluesky (Opens in new window) Bluesky
  • Click to share on Threads (Opens in new window) Threads
  • Click to share on Nextdoor (Opens in new window) Nextdoor
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

  • update Docker desktop
    How to manually update Docker desktop 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
  • portainer feature
    How to Install Docker Portainer on Linux Containers
  • Dockerxx1
    How to install and uninstall Docker Desktop on Windows 10 and Windows Server Containers
  • kubernetes
    Create and monitor Apps using the Azure Kubernetes Service manifest AWS/Azure/OpenShift
  • featurekube
    How to Install and Use Minikube on a Linux System Containers

More Related Articles

update Docker desktop How to manually update Docker desktop 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
portainer feature How to Install Docker Portainer on Linux Containers
Dockerxx1 How to install and uninstall Docker Desktop on Windows 10 and Windows Server Containers
kubernetes Create and monitor Apps using the Azure Kubernetes Service manifest AWS/Azure/OpenShift
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

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • 1 8y62mmvjlr 5uovgoq6zmq
    How to download and install DriveLock on Windows Security | Vulnerability Scans and Assessment
  • Veeam
    Install and configure Veeam Backup and Replication Community Edition Backup
  • Feature image Audio settings
    Master Your Sound Experience: How to Manage Audio Settings on Windows 11 Windows
  • LAPs on Windows Part of the OS
    How to configure Windows LAPS Windows
  • asdfgh
    All Group Policies (GPO) available to configure Microsoft Edge settings Windows Server
  • 1 WeXxkEX0JG3oB781HD8Hrg 1
    Command Prompt in Windows: Creating Volumes Guide Windows
  • HYBRID BENEFITS FEATURE
    Azure Hybrid Use Cases and Benefits AWS/Azure/OpenShift
  • xvy
    Fix Error 0xc1420127: The specified image in the specified wim is already mounted for read and write access Windows 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,836 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

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

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.