Skip to content

Commit af24aea

Browse files
authored
chore: reduce docker examples (#6849)
1 parent 770712e commit af24aea

File tree

12 files changed

+5
-596
lines changed

12 files changed

+5
-596
lines changed

examples/examples.go

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ var (
2525
//go:embed templates/azure-linux
2626
//go:embed templates/do-linux
2727
//go:embed templates/docker
28-
//go:embed templates/docker-code-server
29-
//go:embed templates/docker-image-builds
3028
//go:embed templates/docker-with-dotfiles
3129
//go:embed templates/gcp-linux
3230
//go:embed templates/gcp-vm-container

examples/examples_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestTemplate(t *testing.T) {
3636

3737
func TestSubdirs(t *testing.T) {
3838
t.Parallel()
39-
tarData, err := examples.Archive("docker-image-builds")
39+
tarData, err := examples.Archive("docker")
4040
require.NoError(t, err)
4141

4242
tarReader := tar.NewReader(bytes.NewReader(tarData))
@@ -51,6 +51,6 @@ func TestSubdirs(t *testing.T) {
5151
entryPaths[header.Typeflag] = append(entryPaths[header.Typeflag], header.Name)
5252
}
5353

54-
require.Subset(t, entryPaths[tar.TypeDir], []string{"images"})
55-
require.Subset(t, entryPaths[tar.TypeReg], []string{"README.md", "main.tf", "images/base.Dockerfile"})
54+
require.Subset(t, entryPaths[tar.TypeDir], []string{"build"})
55+
require.Subset(t, entryPaths[tar.TypeReg], []string{"README.md", "main.tf", "build/Dockerfile"})
5656
}

examples/lima/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This will:
2222
- Install Docker and Terraform from the official repos
2323
- Install Coder using the [installation script](https://coder.com/docs/coder-oss/latest/install#installsh)
2424
- Generates an initial user account `admin@coder.com` with a randomly generated password (stored in the VM under `/home/${USER}.linux/.config/coderv2/password`)
25-
- Initializes a [sample Docker template](https://github.com/coder/coder/tree/main/examples/templates/docker-code-server) for creating workspaces
25+
- Initializes a [sample Docker template](https://github.com/coder/coder/tree/main/examples/templates/docker) for creating workspaces
2626

2727
Once this completes, you can visit `http://localhost:3000` and start creating workspaces!
2828

examples/lima/coder.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ provision:
103103
fi
104104
DOCKER_HOST=$(docker context inspect --format '{{.Endpoints.docker.Host}}')
105105
printf 'docker_arch: "%s"\ndocker_host: "%s"\n' "${DOCKER_ARCH}" "${DOCKER_HOST}" | tee "${temp_template_dir}/params.yaml"
106-
coder templates create "docker-code-server-${DOCKER_ARCH}" --directory "${temp_template_dir}" --parameter-file "${temp_template_dir}/params.yaml" --yes
106+
coder templates create "docker-${DOCKER_ARCH}" --directory "${temp_template_dir}" --parameter-file "${temp_template_dir}/params.yaml" --yes
107107
rm -rfv "${temp_template_dir}"
108108
probes:
109109
- description: "docker to be installed"

examples/templates/docker-code-server/README.md

-26
This file was deleted.

examples/templates/docker-code-server/main.tf

-124
This file was deleted.

examples/templates/docker-code-server/params.sample.yaml

-2
This file was deleted.

examples/templates/docker-image-builds/README.md

-167
This file was deleted.

0 commit comments

Comments
 (0)