-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add containerRunOptions * largely picked up from #82, add privileged, capabilities and host volume mounts. these are passed into HostConfig if set * added "user" field which corresponds -u/--user arg in docker wasn't tested for other drivers and more tests likely needed * rename 16.04 tests, pull test image * additional options, update docs * update deps * github.com/containerd/containerd - resolve CVE-2022-23471, CVE-2023-25153 & CVE-2023-25173 * golang.org/x/net - resolve CVE-2022-41717
- Loading branch information
1 parent
5388c50
commit c614b89
Showing
28 changed files
with
416 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
FROM ubuntu:20.04 | ||
RUN apt-get update && apt-get install -y libcap2-bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM ubuntu:20.04 | ||
|
||
RUN useradd --create-home --uid 1001 nonroot | ||
|
||
USER 1001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
schemaVersion: '2.0.0' # Make sure to test the latest schema version | ||
commandTests: | ||
- name: "Test envVars containerRunOptions" | ||
command: "printenv" | ||
expectedOutput: [".*(FOO|BAR)=keepit(secret|safe)!.*"] | ||
containerRunOptions: | ||
envVars: | ||
- FOO | ||
- BAR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
schemaVersion: '2.0.0' # Make sure to test the latest schema version | ||
commandTests: | ||
- name: "Test envFile containerRunOptions" | ||
command: "printenv" | ||
expectedOutput: [".*(FOO|BAR)=keepit(secret|safe)!.*"] | ||
containerRunOptions: | ||
envFile: tests/envfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
schemaVersion: '2.0.0' # Make sure to test the latest schema version | ||
commandTests: | ||
- name: "Test Capabilities containerRunOptions" | ||
command: "capsh" | ||
args: ["--print"] | ||
expectedOutput: | ||
- ".*cap_sys_admin.*" | ||
- name: "Test bindMounts containerRunOptions" | ||
command: "test" | ||
args: | ||
- "-d" | ||
- "/tmp/test" | ||
exitCode: 0 | ||
containerRunOptions: | ||
privileged: true | ||
capabilities: | ||
- "sys_admin" | ||
bindMounts: | ||
- "/tmp/test:/tmp/test" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
schemaVersion: '2.0.0' # Make sure to test the latest schema version | ||
commandTests: | ||
- name: 'apt-get' | ||
command: 'bash' | ||
args: | ||
- -c | ||
- | | ||
whoami | ||
apt-get update | ||
containerRunOptions: | ||
user: 'root' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
schemaVersion: '2.0.0' # Make sure to test the latest schema version | ||
commandTests: | ||
- name: "Test envVars containerRunOptions" | ||
command: "printenv" | ||
expectedOutput: [".*(FOO|BAR)=keepit(secret|safe)!.*"] | ||
containerRunOptions: | ||
envVars: | ||
- FOO | ||
- BAR | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
schemaVersion: '2.0.0' # Make sure to test the latest schema version | ||
commandTests: | ||
- name: "Test envFile containerRunOptions" | ||
command: "printenv" | ||
expectedOutput: [".*(FOO|BAR)=keepit(secret|safe)!.*"] | ||
containerRunOptions: | ||
envFile: tests/envfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
schemaVersion: '2.0.0' # Make sure to test the latest schema version | ||
commandTests: | ||
- name: "Test Capabilities containerRunOptions" | ||
command: "capsh" | ||
args: ["--print"] | ||
expectedOutput: | ||
- ".*cap_sys_admin.*" | ||
- name: "Test bindMounts containerRunOptions" | ||
command: "test" | ||
args: | ||
- "-d" | ||
- "/tmp/test" | ||
exitCode: 0 | ||
containerRunOptions: | ||
privileged: true | ||
capabilities: | ||
- "sys_admin" | ||
bindMounts: | ||
- "/tmp/test:/tmp/test" |
Oops, something went wrong.