Skip to content
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

Add Dockerfile #7

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

AJGranowski
Copy link
Contributor

@AJGranowski AJGranowski commented Jun 2, 2024

What are these changes?

Adds Docker/Podman support to this project. Simply run ./pnpm to launch a temporary container and execute PNPM on the project.

Why are these changes being made?

I used these changes to develop #5 and thought others might find it useful.

A unified development environment improves the first-time developer experience. Rather than needing a guide on installing prerequisite dependencies, developers can simply use the included container image and compose configuration to automatically generate a common development environment. This also improves error reproduction and troubleshooting.

GitHub runners have Docker pre-installed, so this change also lends itself to creating a robust continuous integration system. Developers can write confidently, knowing that their changes will run identically on their machine and the CI system.

Checklist

  • [Ubuntu/Rootless Docker] ./pnpm install succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run ci succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run lint succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run dev succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run clean succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run build:js succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run build:types succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run build succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run prepare succeeds.
  • [Ubuntu/Rootless Docker] ./pnpm run prepublishOnly succeeds.
  • [Ubuntu/Default Docker] ./pnpm install succeeds.
  • [Ubuntu/Default Docker] ./pnpm run ci succeeds.
  • [Ubuntu/Default Docker] ./pnpm run lint succeeds.
  • [Ubuntu/Default Docker] ./pnpm run dev succeeds.
  • [Ubuntu/Default Docker] ./pnpm run clean succeeds.
  • [Ubuntu/Default Docker] ./pnpm run build:js succeeds.
  • [Ubuntu/Default Docker] ./pnpm run build:types succeeds.
  • [Ubuntu/Default Docker] ./pnpm run build succeeds.
  • [Ubuntu/Default Docker] ./pnpm run prepare succeeds.
  • [Ubuntu/Default Docker] ./pnpm run prepublishOnly succeeds.
  • [WSL/Podman] ./pnpm install succeeds.
  • [WSL/Podman] ./pnpm run ci succeeds.
  • [WSL/Podman] ./pnpm run lint succeeds.
  • [WSL/Podman] ./pnpm run dev succeeds.
  • [WSL/Podman] ./pnpm run clean succeeds.
  • [WSL/Podman] ./pnpm run build:js succeeds.
  • [WSL/Podman] ./pnpm run build:types succeeds.
  • [WSL/Podman] ./pnpm run build succeeds.
  • [WSL/Podman] ./pnpm run prepare succeeds.
  • [WSL/Podman] ./pnpm run prepublishOnly succeeds.
  • [WSL/Rootless Docker] ./pnpm install succeeds.
  • [WSL/Rootless Docker] ./pnpm run ci succeeds.
  • [WSL/Rootless Docker] ./pnpm run lint succeeds.
  • [WSL/Rootless Docker] ./pnpm run dev succeeds.
  • [WSL/Rootless Docker] ./pnpm run clean succeeds.
  • [WSL/Rootless Docker] ./pnpm run build:js succeeds.
  • [WSL/Rootless Docker] ./pnpm run build:types succeeds.
  • [WSL/Rootless Docker] ./pnpm run build succeeds.
  • [WSL/Rootless Docker] ./pnpm run prepare succeeds.
  • [WSL/Rootless Docker] ./pnpm run prepublishOnly succeeds.
  • [WSL/Default Docker] ./pnpm install succeeds.
  • [WSL/Default Docker] ./pnpm run ci succeeds.
  • [WSL/Default Docker] ./pnpm run lint succeeds.
  • [WSL/Default Docker] ./pnpm run dev succeeds.
  • [WSL/Default Docker] ./pnpm run clean succeeds.
  • [WSL/Default Docker] ./pnpm run build:js succeeds.
  • [WSL/Default Docker] ./pnpm run build:types succeeds.
  • [WSL/Default Docker] ./pnpm run build succeeds.
  • [WSL/Default Docker] ./pnpm run prepare succeeds.
  • [WSL/Default Docker] ./pnpm run prepublishOnly succeeds.

Additional notes:

  • git is not included in the image causing Husky to not install and return a 0 exit code.
  • Default Docker runs as root, so we need to do some ownership shenanigans to avoid conflicts with the mounted volume on Linux systems. I've incorporated my project that addressees this issue into this PR.

@AJGranowski AJGranowski changed the title Add Development Container Add Dockerfile Oct 2, 2024
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.

1 participant