Skip to content

Add docker-in-docker instructions for k8s #941

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

Closed
wants to merge 1 commit into from

Conversation

matthew-parlette
Copy link

Describe in detail the problem you had and how this PR fixes it

I wanted to do docker development within a code-server container, but the docker binary and daemon weren't available. This PR is my kubernetes deployment that solves this problem using the official docker image.

I wasn't sure exactly where it should go, or if I should include all of the other parts for a kubernetes setup (like the service, ingress, persistent volume claim, or config map), let me know if you'd like the complete example.

Is there an open issue you can link to?

I originally posted this kubernetes example in #199, but a doc PR makes more sense for anyone looking to self-host code-server.

app: code-server
spec:
initContainers:
- name: copy-docker-binary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you do this in a Dockerfile instead? It should lessen the need to allocate additional resources for such a task that a image build would be more fit to.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with using a Dockerfile is that we have to push and maintain the image @sr229.

I suppose its not a big deal though to include the docker CLI by default in codercom/code-server.

@sr229 sr229 added the docs Documentation related label Sep 12, 2019
@nhooyr
Copy link
Contributor

nhooyr commented Sep 20, 2019

The problem here is volume mounts won't work properly. code-server and the daemon need to share the root file system. The move here is probably to add a new code-server image that includes the docker daemon and then add a K8s example for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants