From 992114e7cc674ab2e1569b9c52b6d56eedf0e96c Mon Sep 17 00:00:00 2001 From: Andrey Butirsky Date: Tue, 9 Jun 2026 02:41:43 +0300 Subject: [PATCH] remove :cached from Docker Compose sample The :cached flag is no more actual: https://github.com/docker/for-mac/issues/5402 --- _posts/2022-12-16-dockerfile.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_posts/2022-12-16-dockerfile.md b/_posts/2022-12-16-dockerfile.md index c0b44d68..5d51eed6 100644 --- a/_posts/2022-12-16-dockerfile.md +++ b/_posts/2022-12-16-dockerfile.md @@ -70,7 +70,7 @@ services: devcontainer: image: mcr.microsoft.com/devcontainers/base:ubuntu volumes: - - ../..:/workspaces:cached + - ../..:/workspaces network_mode: service:db command: sleep infinity @@ -89,7 +89,7 @@ volumes: ``` In this example: -- `../..:/workspaces:cached` mounts the workspace folder from the local source tree into the Dev Container. +- `../..:/workspaces` mounts the workspace folder from the local source tree into the Dev Container. - `network_mode: service:db` puts the Dev Container on the same network as the database, so that it can access it on `localhost`. - The `db` section uses the [Postgres](https://hub.docker.com/_/postgres) image with a few settings. @@ -106,7 +106,7 @@ Next, let's configure devcontainer.json to use it. In this example: - `service` indicates which service in the `docker-compose.yml` file is the Dev Container. - `dockerComposeFile` indicates where to find the `docker-compose.yml` file. -- `workspaceFolder` indicates where to mount the workspace folder. This corresponds to a sub-folder under the mount point from `../..:/workspaces:cached` in the `docker-compose.yml` file. +- `workspaceFolder` indicates where to mount the workspace folder. This corresponds to a sub-folder under the mount point from `../..:/workspaces` in the `docker-compose.yml` file. That's it! @@ -122,7 +122,7 @@ services: context: . dockerfile: Dockerfile volumes: - - ../..:/workspaces:cached + - ../..:/workspaces network_mode: service:db command: sleep infinity