Skip to content

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

Merged
bpmct merged 23 commits into
mainfrom
bpmct/add-docker-builds
May 18, 2022
Merged

bpmct merged 23 commits into
mainfrom
bpmct/add-docker-builds

Conversation

@bpmct

@bpmct bpmct commented May 17, 2022 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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

im-coder-lg commented May 17, 2022 •

Copy link
Copy Markdown
Contributor

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?

@johnstcn johnstcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great, thanks @bpmct!

Comment thread examples/docker/main.tf Resolved
Comment thread examples/docker-image-builds/README.md Resolved
@bpmct

bpmct commented May 17, 2022 •

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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.

Comment thread examples/docker-image-builds/README.md Resolved
Comment thread examples/docker-image-builds/README.md Resolved
Comment thread examples/docker-image-builds/README.md Resolved
Comment thread examples/docker-image-builds/README.md Resolved
Comment thread examples/docker-image-builds/README.md Resolved
Comment thread examples/docker/README.md Resolved
Comment thread examples/docker/README.md Resolved
Comment thread examples/docker/README.md Resolved
Comment thread examples/docker/main.tf Resolved
Comment thread examples/docker/main.tf Resolved
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 a team and presleyp as code owners May 18, 2022 18:23
@bpmct

bpmct commented May 18, 2022

Copy link
Copy Markdown
Member Author

ugh i did something very strange. will investigate later today

@greyscaled

Copy link
Copy Markdown
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
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