-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Provide checkpoint function to save underlying RStudio image to docker container registry #123
Comments
This is actually possible just by specifying metadata equal to the key https://cloud.google.com/compute/docs/containers/configuring-options-to-run-containers You can see the current meta data schema by starting an instance via gcloud then downloading its metadata
Then in R: bb <- gce_get_instance("busybox-vm", project = "mark-edmondson-gde", zone = "europe-west3-c")
cat(bb$metadata$items[bb$metadata$items$key == "gce-container-declaration","value"]) which gives: # DISCLAIMER:
# This container declaration format is not a public API and may change without
# notice. Please use gcloud command-line tool or Google Cloud Console to run
# Containers on Google Compute Engine.
spec:
containers:
- args:
- -c
- ls -l
command:
- /bin/ash
env:
- name: OWNER
value: admin
- name: HOME
value: /home
- name: MODE
value: test
image: docker.io/busybox:1.27
name: busybox-vm
securityContext:
privileged: false
stdin: false
tty: false
volumeMounts: []
restartPolicy: Always
volumes: [] |
After lots of brick walls I've come to the conclusion its simply not a good idea to use The RStudio templates have been updated to use startup scripts instead of cloud-config, mainly as startup scripts are easier to call instance metadata into. The metadata can be updated and so on reboot the underlying container can be migrated. To preserve the state of the containers as a user installs and adds data/scripts, I propose a check point system using |
A lot of issues with keeping persistent packages within containers could be solved if instead of running
docker run
for each VM restart, it instead randocker start
if the container already exists. IF all else fails, make a bash script.Re: bc3d906?diff=split
The text was updated successfully, but these errors were encountered: