Skip to content

chore: use dogfood-oss image in .devcontainer #8231

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 18 commits into from
Jul 11, 2023
Merged

Conversation

matifali
Copy link
Member

@matifali matifali commented Jun 27, 2023

Context

This PR

  1. Fixes .devcontainer in coder/coder doesn't create a working dev environment.  #7591
  2. Fixes dogfood: use same/similar environment for .devcontainer and dogfood template. #5211

Contributes to #7676

What does it do

Testing

I have tested the proposed modification in .devcontainer.
with

  • VM with Docker installed
  • GitHub Codespaces (requires --privileged)

with following commands

  1. make fmt
  2. make lint
  3. make test
  4. ./scripts/develop.sh

    For GitHub Codespaces, set export NODE_OPTIONS=--max-old-space-size=4096 instead of 8196 as the max memory provided by a 4 core 8 GB workspace is 7139 Mb

What we can do Next

Next, I am going to test a dogfood template using coder/envbuilder and .devcontainer

I guess we can also safely remove the docker installation from our dogfood Dockerfile

Also, I would like to remove most of the packages we install in Dockerfile to be replaced with devcontainer features,
e.g.,

  1. go
  2. node
  3. rust (if we need this)
  4. Postgres
  5. GitHub CLI
  6. Hugo
  7. etc...

This will make it modular and easy to maintain.

@matifali matifali marked this pull request as draft June 27, 2023 13:01
@bpmct
Copy link
Member

bpmct commented Jun 28, 2023

Thanks for submitting this, this will be huge! What else does this PR need to be ready for review?

@matifali
Copy link
Member Author

I need to test it on a VM or physical server. After that I will mark as ready for review.

@matifali
Copy link
Member Author

matifali commented Jun 28, 2023

Hi, @bpmct
We need docker in docker to run ./scripts/develop.sh
I have started a draft PR basing our devcontainer on dogfood Dockerfile

I assume that not every user will be running a sysbox runtime as we do for our dogfood template.

For getting docker in docker in devcontainer we have,

  1. https://github.com/microsoft/vscode-dev-containers/blob/main/containers/docker-in-docker/README.md
  2. https://github.com/devcontainers/features/tree/main/src/docker-in-docker

I can use some suggestions and feedback here.

@matifali matifali changed the title chore: use dogfood Dokcerfile in .devcontainer chore: use dogfood Dockerfile in .devcontainer Jun 28, 2023
@matifali matifali marked this pull request as ready for review July 4, 2023 15:43
@matifali matifali requested review from kylecarbs, ammario and bpmct July 4, 2023 15:43
@matifali matifali changed the title chore: use dogfood Dockerfile in .devcontainer chore: use dogfood-oss image in .devcontainer Jul 4, 2023
@ammario ammario removed their request for review July 4, 2023 18:11
@matifali matifali requested a review from johnstcn July 5, 2023 09:15
@johnstcn johnstcn removed their request for review July 5, 2023 09:23
@bpmct bpmct merged commit 700ec96 into main Jul 11, 2023
@bpmct bpmct deleted the matifali/devcontainer branch July 11, 2023 14:48
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.devcontainer in coder/coder doesn't create a working dev environment. dogfood: use same/similar environment for .devcontainer and dogfood template.
2 participants