runtime-spec | OCI Runtime Specification | Continuous Deployment library
kandi X-RAY | runtime-spec Summary
kandi X-RAY | runtime-spec Summary
The Open Container Initiative develops specifications for standards on Operating System process and application containers.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of runtime-spec
runtime-spec Key Features
runtime-spec Examples and Code Snippets
Community Discussions
Trending Discussions on runtime-spec
QUESTION
I'm trying to use snyk with a privately hosted repository that is managed using podman.
snyk container test --username="user" --password="pass" --platform="linux/arm64" oci.example.com/image -d
I've tried using oci.example.com/image:latest
oci.example.com/image:arm64
also and making sure they exist on the repository.
The error I keep getting is:
snyk-test error: FailedToRunTestError: OCI manifest found, but accept header does not support OCI manifests
I can reproduce the same error using the API directly:
curl -u 'user:pass' -i -H "Accept: application/vnd.docker.distribution.manifest.v2+json" https://oci.example.com/v2/mailpile/image/latest
This works though:
curl -u 'user:pass' -i -H "Accept: application/vnd.oci.image.manifest.v1+json" https://oci.example.com/v2/[IMAGE]/manifests/latest
I wonder what I'm missing. Maybe snyk relies on a distribution.manifest that podman push oci.example.com/image
does not seem to provide, suspected after reading: https://podman.io/blogs/2021/10/11/multiarch.html
Due to the way image-name references are internally processed, you should not use the usual podman push and podman rmi subcommands. THEY WILL NOT DO WHAT YOU EXPECT! Instead, you’ll want to use podman manifest push --all and podman manifest rm (similarly for buildah). These will push/remove the manifest list itself instead of the contents. Similarly for tagging if you’re on Podman v3.4, use the buildah tag command instead.
I also verified this peeking with manifest inspect
, indeed it seems it only attaches image and no distribution.manifest by default.
The OpenSUSE Debian Podman repo latest version:
...ANSWER
Answered 2021-Nov-13 at 09:35Steps to fix:
podman build --format=docker -t oci.example.com/image .
podman push oci.example.com/image oci.example.com/image
QUESTION
I have a C# 7.3 project Foo
which I want to publish as a Nuget package. I want my package be available for different architectures (x86 & x64), different platforms (Windows & Linux) and different .Net versions (4.8 framework & 5.0).
Foo
C# code itself does not contain any architecture-specific code, it consists only of pure C# 7.3. But this project uses my custom platform-specific .dll and .so on Linux (say ExternalLib.dll
/ ExternalLib.dll.so
). I have one of them for each Windows x64, Windows x86 and etc.
I know that in the NuGet package you place runtime-specific components in /runtimes
folder structure like /runtimes/win10-x64/native/ExternalLib.dll
. As documentation says, these will be used only for runtime and I need to specify compile-time references.
I built my Foo
project in Any CPU
configuration for each net4.7 and net5.0 and placed each Foo.dll
in /lib
folder. So my final folder structure for the module is
ANSWER
Answered 2021-Oct-10 at 17:51I finally did it. After a research, this is my approach:
If you write a C# library, use only .NetStandard, so both .Net and .NetFramework applications can use your library. I used .NetStandard2.0 which can be used from both .Net5.0 and .NetFramework4.8. See this for all compatible versions.
Clear NuGet cache
Provide xml documentation (optional)
Final .nuspec file:
QUESTION
The background of my question is a set of test cases for my Linux-kernel Namespaces discovery Go package lxkns where I create a new child user namespace as well as a new child PID namespace inside a test container. I then need to remount /proc, otherwise I would see the wrong process information and cannot lookup the correct process-related information, such as the namespaces of the test process inside the new child user+PID namespaces (without resorting to guerilla tactics).
The test harness/test setup is essentially this and fails without --privileged
(I'm simplifying to all caps and switching off seccomp and apparmor in order to cut through to the real meat):
ANSWER
Answered 2021-Jan-30 at 16:26Quite some more digging turned up this answer to "About mounting and unmounting inherited mounts inside a newly-created mount namespace" which points in the correct direction, but needs additional explanations (not least due to basing on a misleading paragraph about mount namespaces being hierarchical from man pages which Michael Kerrisk fixed some time ago).
Our starting point is when runc
sets up the (test) container, for masking system paths especially in the container's future /proc
tree, it creates a set of new mounts to either mask out individual files using /dev/null
or subdirectories using tmpfs
. This results in procfs
being mounted on /proc
, as well as further sub-mounts.
Now the test container starts and at some point a process unshares into a new user namespace. Please keep in mind that this new user namespace (again) belongs to the (real) root user with UID 0, as a default Docker installation won't enable running containers in new user namespaces.
Next, the test process also unshares into a new mount namespace, so this new mount namespace belongs to the newly created user namespace, but not to the initial user namespace. According to section "restrictions on mount namespaces" in mount_namespaces(7):
If the new namespace and the namespace from which the mount point list was copied are owned by different user namespaces, then the new mount namespace is considered less privileged.
Please note that the criterion here is: the "donor" mount namespace and the new mount namespace have different user namespaces; it doesn't matter whether they have the same owner user (UID), or not.
The important clue now is:
Mounts that come as a single unit from a more privileged mount namespace are locked together and may not be separated in a less privileged mount namespace. (The unshare(2) CLONE_NEWNS operation brings across all of the mounts from the original mount namespace as a single unit, and recursive mounts that propagate between mount namespaces propagate as a single unit.)
As it now is not possible anymore to separate the /proc
mountpoint as well as the masking submounts, it's not possible to (re)mount /proc
(question 1). In the same sense, it is impossible to unmount /proc/kcore
, because that would allow unmasking (question 2).
Now, when deploying the test container using --security-opt systempaths=unconfined
this results in a single /proc
mount only, without any of the masking submounts. In consequence and according to the man page rules cited above, there is only a single mount which we are allowed to (re)mount, subject to the CAP_SYS_ADMIN
capability including also mounting (besides tons of other interesting functionality).
Please note that it is possible to unmount masked /proc/
paths inside the container while still in the original (=initial) user namespace and when possessing (not surprisingly) CAP_SYS_ADMIN
. The (b)lock only kicks in with a separate user namespace, hence some projects striving for deploying containers in their own new user namespaces (which unfortunately has effects not least on container networking).
QUESTION
I need to move the configuration of the datasource to runtime.groovy, because that configuration code need to access some of my classes.
In previous versions of grails, this was not an issue. However i find that if I move the environments block, and the default datasource block to runtime.groovy, Hibernate will not create the database, and my functional tests fail, obviously.
This is the configuration that I removed from application.yml:
...ANSWER
Answered 2020-Nov-14 at 14:01The config you show for your runtime.groovy
should be in grails-app/conf/application.groovy
(does not need to be runtime.groovy
). The problem with your config is you have this:
QUESTION
When using windows container workloads on Azure Batch quotes are stripped from command line arguments if they do not contain a space.
We are using the newest C# SDK 13.0.0 and node VMs SKU windows server 2019 with containers.
Repro:
Create job and a task running inside a docker container (e.g. based on the docker image mcr.microsoft.com/windows/servercore:ltsc2019)
use command line of cmd /S /C mkdir "c:/foo"
- see that inside the docker container the command is executed as cmd /S /C mkdir c:/foo
- which will fail.
The same issue is described in this open containers PR: https://github.com/opencontainers/runtime-spec/commit/deb4d954eafc4fc65f04c00a08e08c3e69df32d0
Edit: I realized that this was more as statement than a question... so here is the question: What is a workaround/fix for this behavior?
Edit powershell -EncodedCommand Solution:
I accepted the environment variable solution but we are using a different one.
We use "https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_powershell_exe?view=powershell-5.1#-encodedcommand-base64encodedcommand
" - doing so hides quotes and backslashes from CommandLineToArgsvW and docker - meaning the commandline gets put together properly inside the docker container on the azure batch vm. (In C# this is done by var base64EncodedCmd = System.Convert.ToBase64String(System.Text.Encoding.Unicode.GetBytes(cmd));
) Take care to escape powershell properly as well. e.g. the encoded command could be something lik "& my.exe --% --input \\\"userprovidedparam\\""
(using powershells "stop parsing" --%) otherwise e.g. a value of $(Get-Date) would be evaluated
ANSWER
Answered 2020-Aug-06 at 22:41Given this is an issue with the runtime, a potential workaround is to create a .cmd
or .bat
file that contains the commands you would like to run. You can associate this file as a ResourceFile or bake it into a custom container.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install runtime-spec
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page