-
Notifications
You must be signed in to change notification settings - Fork 1
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
Repo: docker/VM setup for runtime engine testing #42
Comments
Instructions to setup Linux VM with Go 1.17.7 installed for engine/runtime development: Importing VM Appliance to VirtualBox
Q: Why do you need to create a VM for runtime development? |
Update: Previous testing with From testing with a minimal Dockerfile, this should be possible to use the runner engine within Docker with a Dockerfile like so: FROM golang:1.17.7-buster as builder
WORKDIR /runner
COPY . .
RUN go build -v -o /runner/process /runner/engine/process/
# TODO: use slimmer docker image like ubuntu:20.04
FROM golang:1.17.7-buster
# create non-root user, assign UID != 0
RUN useradd -u 1111 -ms /bin/bash runner
# define user to start up as
USER runner
WORKDIR /home/runner
COPY --from=builder /runner/process ./
ENTRYPOINT ["/bin/bash"] One note of caution is that the limits are per-user. I think the best solution to this would be to use cgroups instead since this offers a more granular process-by-process control. However, we can still accomplish process limiting by creating new users for each runner request (and re-use users as needed). This post made me realize I was testing wrong before: https://unix.stackexchange.com/questions/303190/prlimit-fails-are-20-processes-not-enough-for-bash Other helpful links: |
Thank you for posting! Now I know how to use setrlimit properly...
|
This comment reminded me I did not update this issue with the latest way to setup the dev environment. The instructions I posted in this issue about setting up a VM are not necessary. Fortunately, you do not need a VM and there are updated instructions in README for how to setup Docker and VSCode for the project: https://github.com/camerondurham/runner#using-dev-containers-with-vscode-recommended |
Use Sylvia's branch, should be able to use syscalls:chrootsethostnamesetrlimitEDIT:
Unable to use syscalls requested with Docker settings. Recommend using VM, WSL, or native Linux install to run.
Have prepared an Ubuntu Server VM .ova file to import into VirtualBox:
The text was updated successfully, but these errors were encountered: