Skip to content

example: add docker-image-builds + docker docs #1526

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 23 commits into from
May 18, 2022
Merged

Conversation

bpmct
Copy link
Member

@bpmct bpmct commented May 17, 2022

This PR introduces a few changes to the Docker example, and adds a new one:

  • rename docker-local to docker
  • add warning specifying the template uses the Coder host's docker socket (previously in template name)
    Screen Shot 2022-05-17 at 10 55 26 AM
  • add arch admin parameter to support m1 and armv7 docker hosts
  • document arch restrictions for codercom/enterprise-* images (Bug: Can't use Docker locally ( RPi ) #1334)
    Screen Shot 2022-05-17 at 10 48 38 AM
  • add example: coder-image-builds that builds images on the TF host, without a registry. Dockerfiles included :)
    asciicast
  • add documentation for CRUD images for both examples
  • add documentation for extending images with additional features from the Terraform provider

I think this PR will help with usability for docker examples without adding too much complexity. I'm not sure about the optimal format for examples yet, but doing a few more in a similar way should help us give us some more clarity :)

Fixes #1526, #1334

@bpmct bpmct self-assigned this May 17, 2022
@bpmct bpmct requested review from johnstcn and ntimo May 17, 2022 16:05
@im-coder-lg
Copy link
Contributor

Oh suh-weet! Now I have dev workspaces like never before. Also, when I tested Coder on Gitpod(Linux amd64 test machines for free), I saw a dashboard under WIP for images. Anything planned for that yet?

@im-coder-lg
Copy link
Contributor

im-coder-lg commented May 17, 2022

And also, do they load your system up? Like, does building a Docker image take much storage? If it does, I am scared since the last time I got it to just 3 GB in a week(I use a 32 GB SD card for my Pi, it's good enough) was when I was out of station with my Pi. If it loads the SD card, is there a way to clear that storage?

Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Looks great, thanks @bpmct!

@bpmct
Copy link
Member Author

bpmct commented May 17, 2022

And also, do they load your system up? Like, does building a Docker image take much storage? If it does, I am scared since the last time I got it to just 3 GB in a week(I use a 32 GB SD card for my Pi, it's good enough) was when I was out of station with my Pi. If it loads the SD card, is there a way to clear that storage?

You'll probably want to periodically run docker image prun, perhaps on CRON to disregard old images. https://alexgallacher.com/prune-unused-docker-images-automatically/

@im-coder-lg Can you keep the PR on-topic? If you have other questions, please ask in Discord 🙌🏼

@im-coder-lg
Copy link
Contributor

Can you keep the PR on-topic? If you have other questions, please ask in Discord 🙌🏼

Sorry, I got a bit excited. Will do if I get any.

bpmct and others added 9 commits May 18, 2022 12:59
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
Co-authored-by: Katie Horne <katie@23spoons.com>
@bpmct bpmct requested review from presleyp and a team as code owners May 18, 2022 18:23
@bpmct
Copy link
Member Author

bpmct commented May 18, 2022

ugh i did something very strange. will investigate later today

@greyscaled
Copy link
Contributor

@bpmct just need to rebase or merge in latest main

@bpmct bpmct removed request for a team and presleyp May 18, 2022 20:52
@bpmct bpmct merged commit 37cf3bb into main May 18, 2022
@bpmct bpmct deleted the bpmct/add-docker-builds branch May 18, 2022 21:03
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
Co-authored-by: Katie Horne <katie@23spoons.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants