-
Notifications
You must be signed in to change notification settings - Fork 417
add 'make dev' target to develop in a container #10
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| packages/* | ||
| local-melange.rsa | ||
| local-melange.rsa.pub |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| ARCH := $(shell uname -m) | ||
| MELANGE_DIR ?= ../melange | ||
| MELANGE ?= ${MELANGE_DIR}/melange | ||
| MELANGE ?= $(shell which melange) | ||
| MELANGE_DIR ?= /usr/share/melange | ||
| KEY ?= local-melange.rsa | ||
| REPO ?= $(shell pwd)/packages | ||
|
|
||
|
|
@@ -210,3 +210,13 @@ $(eval $(call build-package,giflib,5.2.1-r0)) | |
| $(eval $(call build-package,jenkins,2.378-r0)) | ||
|
|
||
| .build-packages: ${PACKAGES} | ||
|
|
||
| dev: | ||
| docker run \ | ||
| -v $(shell pwd):/work \ | ||
| --workdir=/work \ | ||
| --rm -it \ | ||
| --entrypoint=sh \ | ||
| --platform=linux/amd64 \ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW I was getting a bwrap error too, With the help of @amouat we figured I needed to use Maybe we could use
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I'm on an M1 mac (it sounds like you are too?). If I run this with Because Wolfi packages aren't currently built for arm64 yet. If I run this with If I use an x86_64 machine and If a generalized dev container isn't possible, we should document what's necessary (an x86_64 machine, what tools, etc.), and I'll get one of those instead.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this is a pain. I'm pretty sure it is an emulation thing. I'm not sure if it's 2x QEMU or rosetta & QEMU, but running the x86_64 image on m1 does seem to fail with bwrap. I suspect what will work is running in a full blown Alpine VM on a Mac. Has anyone tried with Lima? https://github.com/chainguard-dev/apko/blob/main/mac/README.md
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Ah sorry, yes and building x86_64 |
||
| --privileged \ | ||
| cgr.dev/chainguard/sdk | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probe for this, because on my desktop setup, it really is
../melange.