Skip to content

chore: reduce docker examples #6849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions examples/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ var (
//go:embed templates/azure-linux
//go:embed templates/do-linux
//go:embed templates/docker
//go:embed templates/docker-code-server
//go:embed templates/docker-image-builds
//go:embed templates/docker-with-dotfiles
//go:embed templates/gcp-linux
//go:embed templates/gcp-vm-container
Expand Down
6 changes: 3 additions & 3 deletions examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestTemplate(t *testing.T) {

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

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

require.Subset(t, entryPaths[tar.TypeDir], []string{"images"})
require.Subset(t, entryPaths[tar.TypeReg], []string{"README.md", "main.tf", "images/base.Dockerfile"})
require.Subset(t, entryPaths[tar.TypeDir], []string{"build"})
require.Subset(t, entryPaths[tar.TypeReg], []string{"README.md", "main.tf", "build/Dockerfile"})
}
2 changes: 1 addition & 1 deletion examples/lima/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This will:
- Install Docker and Terraform from the official repos
- Install Coder using the [installation script](https://coder.com/docs/coder-oss/latest/install#installsh)
- Generates an initial user account `admin@coder.com` with a randomly generated password (stored in the VM under `/home/${USER}.linux/.config/coderv2/password`)
- Initializes a [sample Docker template](https://github.com/coder/coder/tree/main/examples/templates/docker-code-server) for creating workspaces
- Initializes a [sample Docker template](https://github.com/coder/coder/tree/main/examples/templates/docker) for creating workspaces

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

Expand Down
2 changes: 1 addition & 1 deletion examples/lima/coder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ provision:
fi
DOCKER_HOST=$(docker context inspect --format '{{.Endpoints.docker.Host}}')
printf 'docker_arch: "%s"\ndocker_host: "%s"\n' "${DOCKER_ARCH}" "${DOCKER_HOST}" | tee "${temp_template_dir}/params.yaml"
coder templates create "docker-code-server-${DOCKER_ARCH}" --directory "${temp_template_dir}" --parameter-file "${temp_template_dir}/params.yaml" --yes
coder templates create "docker-${DOCKER_ARCH}" --directory "${temp_template_dir}" --parameter-file "${temp_template_dir}/params.yaml" --yes
rm -rfv "${temp_template_dir}"
probes:
- description: "docker to be installed"
Expand Down
26 changes: 0 additions & 26 deletions examples/templates/docker-code-server/README.md

This file was deleted.

124 changes: 0 additions & 124 deletions examples/templates/docker-code-server/main.tf

This file was deleted.

2 changes: 0 additions & 2 deletions examples/templates/docker-code-server/params.sample.yaml

This file was deleted.

167 changes: 0 additions & 167 deletions examples/templates/docker-image-builds/README.md

This file was deleted.

Loading