Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: runfinch/finch-daemon
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 12c44d843de94ad73740bc7a31ba22de61c44361
Choose a base ref
...
head repository: runfinch/finch-daemon
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 94aa3696d07a69bd9f2d299ce9f9bc89b212b3c4
Choose a head ref
  • 18 commits
  • 34 files changed
  • 5 contributors

Commits on Dec 5, 2024

  1. build(deps): Bump github.com/vishvananda/netns from 0.0.4 to 0.0.5 (#112

    )
    
    Bumps [github.com/vishvananda/netns](https://github.com/vishvananda/netns) from 0.0.4 to 0.0.5.
    - [Release notes](https://github.com/vishvananda/netns/releases)
    - [Commits](vishvananda/netns@v0.0.4...v0.0.5)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/vishvananda/netns
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    40d3991 View commit details

Commits on Dec 9, 2024

  1. build(deps): Bump google.golang.org/protobuf from 1.35.1 to 1.35.2 (#116

    )
    
    Bumps google.golang.org/protobuf from 1.35.1 to 1.35.2.
    
    ---
    updated-dependencies:
    - dependency-name: google.golang.org/protobuf
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 9, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    682d4cd View commit details
  2. ci: add containerd testing matrix (#114)

    * ci: add containerd testing matrix
    * ci: add job timeouts
    
    ---------
    
    Signed-off-by: Austin Vazquez <[email protected]>
    austinvazquez authored Dec 9, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    2160df1 View commit details

Commits on Dec 12, 2024

  1. build(deps): Bump golang.org/x/crypto from 0.29.0 to 0.31.0 (#120)

    Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.29.0 to 0.31.0.
    - [Commits](golang/crypto@v0.29.0...v0.31.0)
    
    ---
    updated-dependencies:
    - dependency-name: golang.org/x/crypto
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 12, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5c99f3e View commit details

Commits on Dec 19, 2024

  1. fix: Update go mod to fix CVE-2024-45338 (#124)

    Signed-off-by: Arjun Raja Yogidas <[email protected]>
    coderbirju authored Dec 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    19a3980 View commit details

Commits on Dec 20, 2024

  1. build(deps): Bump github.com/containerd/cgroups/v3 from 3.0.3 to 3.0.5 (

    #130)
    
    Bumps [github.com/containerd/cgroups/v3](https://github.com/containerd/cgroups) from 3.0.3 to 3.0.5.
    - [Release notes](https://github.com/containerd/cgroups/releases)
    - [Commits](containerd/cgroups@v3.0.3...v3.0.5)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/containerd/cgroups/v3
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 20, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bc69841 View commit details
  2. build(deps): Bump github.com/onsi/ginkgo/v2 from 2.20.2 to 2.22.1 (#129)

    Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.20.2 to 2.22.1.
    - [Release notes](https://github.com/onsi/ginkgo/releases)
    - [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
    - [Commits](onsi/ginkgo@v2.20.2...v2.22.1)
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 20, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    606c16b View commit details
  3. chore: add api options to container create (#122)

    Signed-off-by: Arjun Raja Yogidas <[email protected]>
    coderbirju authored Dec 20, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9fda9cd View commit details
  4. feat: add distribution API (with bug fix) (#121)

    * feat: add distribution API
    ---------
    
    Signed-off-by: Justin <[email protected]>
    Signed-off-by: Justin Alvarez <[email protected]>
    pendo324 authored Dec 20, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    da0dab7 View commit details

Commits on Dec 22, 2024

  1. build(deps): Bump github.com/docker/docker from 26.1.5+incompatible t…

    …o 27.4.1+incompatible (#127)
    
    * build(deps): Bump github.com/docker/docker
    Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.1.5+incompatible to 27.4.1+incompatible.
    ---------
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Signed-off-by: Arjun Raja Yogidas <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    coderbirju and dependabot[bot] authored Dec 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    f77066d View commit details
  2. ci(deps): Bump actions/setup-go from 5.1.0 to 5.2.0 (#119)

    Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.1.0 to 5.2.0.
    
    ---
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    014aad9 View commit details
  3. build(deps): Bump google.golang.org/protobuf from 1.35.2 to 1.36.0 (#128

    )
    
    Bumps google.golang.org/protobuf from 1.35.2 to 1.36.0.
    
    ---
    updated-dependencies:
    - dependency-name: google.golang.org/protobuf
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 22, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    b46d499 View commit details

Commits on Dec 24, 2024

  1. build(deps): Bump github.com/containerd/go-cni from 1.1.10 to 1.1.11 (#…

    …134)
    
    Bumps [github.com/containerd/go-cni](https://github.com/containerd/go-cni) from 1.1.10 to 1.1.11.
    - [Release notes](https://github.com/containerd/go-cni/releases)
    - [Commits](containerd/go-cni@v1.1.10...v1.1.11)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/containerd/go-cni
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    82f9629 View commit details
  2. build(deps): Bump github.com/moby/moby from 26.0.0+incompatible to 27…

    ….4.1+incompatible (#132)
    
    build(deps): Bump github.com/moby/moby
    
    Bumps [github.com/moby/moby](https://github.com/moby/moby) from 26.0.0+incompatible to 27.4.1+incompatible.
    - [Release notes](https://github.com/moby/moby/releases)
    - [Commits](moby/moby@v26.0.0...v27.4.1)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/moby/moby
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    da5f7cd View commit details
  3. build(deps): Bump github.com/docker/cli from 26.0.0+incompatible to 2…

    …7.4.1+incompatible (#125)
    
    build(deps): Bump github.com/docker/cli
    
    Bumps [github.com/docker/cli](https://github.com/docker/cli) from 26.0.0+incompatible to 27.4.1+incompatible.
    - [Commits](docker/cli@v26.0.0...v27.4.1)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/docker/cli
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    bff4a1f View commit details

Commits on Dec 27, 2024

  1. build(deps): Bump github.com/containerd/typeurl/v2 from 2.2.0 to 2.2.3 (

    #133)
    
    Bumps [github.com/containerd/typeurl/v2](https://github.com/containerd/typeurl) from 2.2.0 to 2.2.3.
    - [Release notes](https://github.com/containerd/typeurl/releases)
    - [Commits](containerd/typeurl@v2.2.0...v2.2.3)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/containerd/typeurl/v2
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 27, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    d9704ff View commit details
  2. build(deps): Bump github.com/onsi/gomega from 1.36.1 to 1.36.2 (#136)

    Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.36.1 to 1.36.2.
    - [Release notes](https://github.com/onsi/gomega/releases)
    - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
    - [Commits](onsi/gomega@v1.36.1...v1.36.2)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/onsi/gomega
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Dec 27, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    72facd2 View commit details
  3. chore(main): release 0.12.0 (#113)

    Co-authoroed-by: Kern Walster <[email protected]>
    
    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Dec 27, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    94aa369 View commit details
47 changes: 36 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ env:
jobs:
git-secrets:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Pull latest awslabs/git-secrets repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@@ -34,10 +35,11 @@ jobs:
git secrets --register-aws
git secrets --scan-history
lint:
runs-on: ubuntu-latest
strategy:
matrix:
working_dir: ['.']
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: golangci/golangci-lint-action@v6 # v6.1.0
@@ -51,31 +53,54 @@ jobs:
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- run: yamllint .
unit-test:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: Checkout finch-deamon repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Build and run unit tests
run: |
make build
make test-unit
- name: Build the daemon
run: make build
- name: Run unit tests
run: make test-unit
- name: Create build artifacts
run: tar -cvf build-artifacts.tar bin/
- name: Upload build artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: build-artifacts
path: build-artifacts.tar
e2e-test:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
containerd: ["1.7.22", "2.0.0"]
fail-fast: false
timeout-minutes: 10
env:
CONTAINERD_VERSION: ${{ matrix.containerd }}
steps:
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout finch-daemon repo
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Stop pre-existing containerd and docker services
run: |
sudo systemctl stop docker
sudo systemctl stop containerd
- name: Install Dependencies for e2e Testing
run: ./setup-test-env.sh
- name: Build the daemon
run: make build
- name: Download build artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: build-artifacts
- name: Extract build artifacts
run: tar -xvf build-artifacts.tar
- name: Remove default podman network config
run: |
sudo ls /etc/cni/net.d
2 changes: 1 addition & 1 deletion .github/workflows/release-automation.yaml
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-tags: true
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: ${{ env.GO_VERSION }}
cache: false
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.11.0"
".": "0.12.0"
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [0.12.0](https://github.com/runfinch/finch-daemon/compare/v0.11.0...v0.12.0) (2024-12-27)


### Build System or External Dependencies

* **deps:** Bump github.com/containerd/cgroups/v3 from 3.0.3 to 3.0.5 ([#130](https://github.com/runfinch/finch-daemon/issues/130)) ([bc69841](https://github.com/runfinch/finch-daemon/commit/bc6984128b4c47bb933f6aba46b7802d9bf9e70d))
* **deps:** Bump github.com/containerd/go-cni from 1.1.10 to 1.1.11 ([#134](https://github.com/runfinch/finch-daemon/issues/134)) ([82f9629](https://github.com/runfinch/finch-daemon/commit/82f9629b3088450c7bf6ef178344993a44aea785))
* **deps:** Bump github.com/containerd/typeurl/v2 from 2.2.0 to 2.2.3 ([#133](https://github.com/runfinch/finch-daemon/issues/133)) ([d9704ff](https://github.com/runfinch/finch-daemon/commit/d9704ff415483774bdffe1b474b4d25315346abd))
* **deps:** Bump github.com/docker/cli from 26.0.0+incompatible to 27.4.1+incompatible ([#125](https://github.com/runfinch/finch-daemon/issues/125)) ([bff4a1f](https://github.com/runfinch/finch-daemon/commit/bff4a1fe3eae771e491583e99dad3d14ee11d97c))
* **deps:** Bump github.com/docker/docker from 26.1.5+incompatible to 27.4.1+incompatible ([#127](https://github.com/runfinch/finch-daemon/issues/127)) ([f77066d](https://github.com/runfinch/finch-daemon/commit/f77066dd388b1290dc4c31c3f8e28301c0b96f8d))
* **deps:** Bump github.com/moby/moby from 26.0.0+incompatible to 27.4.1+incompatible ([#132](https://github.com/runfinch/finch-daemon/issues/132)) ([da5f7cd](https://github.com/runfinch/finch-daemon/commit/da5f7cd3339d3164fd1c51fe8b55bd42d4c92757))
* **deps:** Bump github.com/onsi/ginkgo/v2 from 2.20.2 to 2.22.1 ([#129](https://github.com/runfinch/finch-daemon/issues/129)) ([606c16b](https://github.com/runfinch/finch-daemon/commit/606c16b0ccbf018aa65cdc4b4c3cbc3e0071061c))
* **deps:** Bump github.com/onsi/gomega from 1.36.1 to 1.36.2 ([#136](https://github.com/runfinch/finch-daemon/issues/136)) ([72facd2](https://github.com/runfinch/finch-daemon/commit/72facd29138b19bae5302fc06efd281a26c28cdd))
* **deps:** Bump github.com/vishvananda/netns from 0.0.4 to 0.0.5 ([#112](https://github.com/runfinch/finch-daemon/issues/112)) ([40d3991](https://github.com/runfinch/finch-daemon/commit/40d3991864516be6816abbb788118aaaf6e29802))
* **deps:** Bump golang.org/x/crypto from 0.29.0 to 0.31.0 ([#120](https://github.com/runfinch/finch-daemon/issues/120)) ([5c99f3e](https://github.com/runfinch/finch-daemon/commit/5c99f3e7ddfacdf5793c7eac32c6d7e1aa54d780))
* **deps:** Bump google.golang.org/protobuf from 1.35.1 to 1.35.2 ([#116](https://github.com/runfinch/finch-daemon/issues/116)) ([682d4cd](https://github.com/runfinch/finch-daemon/commit/682d4cddf09c19a254e5341d9c7842d4da3e2d3c))
* **deps:** Bump google.golang.org/protobuf from 1.35.2 to 1.36.0 ([#128](https://github.com/runfinch/finch-daemon/issues/128)) ([b46d499](https://github.com/runfinch/finch-daemon/commit/b46d49935a6001c63f884c1d184346ea7445a8b8))


### Features

* add distribution API (with bug fix) ([#121](https://github.com/runfinch/finch-daemon/issues/121)) ([da0dab7](https://github.com/runfinch/finch-daemon/commit/da0dab73d84aac1d7e7ac432774480d49ccf495e))
* add more options to container create API ([#122](https://github.com/runfinch/finch-daemon/pull/122)) ([9fda9cd](https://github.com/runfinch/finch-daemon/commit/9fda9cd9d4ae6355588410871b71ef5217082bbb))


### Bug Fixes

* Update go mod to fix CVE-2024-45338 ([#124](https://github.com/runfinch/finch-daemon/issues/124)) ([19a3980](https://github.com/runfinch/finch-daemon/commit/19a3980b0bd897fb814143eeb8255837f42c1014))

## [0.11.0](https://github.com/runfinch/finch-daemon/compare/v0.10.0...v0.11.0) (2024-11-27)


64 changes: 57 additions & 7 deletions api/handlers/container/create.go
Original file line number Diff line number Diff line change
@@ -107,6 +107,22 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
}
}

// Annotations: TODO - available in nerdctl 2.0
// Annotations are passed in as a map of strings,
// but nerdctl expects an array of strings with format [annotations1=VALUE1, annotations2=VALUE2, ...].
// annotations := []string{}
// if req.HostConfig.Annotations != nil {
// for key, val := range req.HostConfig.Annotations {
// annotations = append(annotations, fmt.Sprintf("%s=%s", key, val))
// }
// }

ulimits := []string{}
if req.HostConfig.Ulimits != nil {
for _, ulimit := range req.HostConfig.Ulimits {
ulimits = append(ulimits, ulimit.String())
}
}
// Environment vars:
env := []string{}
if req.Env != nil {
@@ -119,6 +135,36 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
capAdd = req.HostConfig.CapAdd
}

capDrop := []string{}
if req.HostConfig.CapDrop != nil {
capDrop = req.HostConfig.CapDrop
}

memoryReservation := ""
if req.HostConfig.MemoryReservation != 0 {
memoryReservation = fmt.Sprint(req.HostConfig.MemoryReservation)
}

memorySwap := ""
if req.HostConfig.MemorySwap != 0 {
memorySwap = fmt.Sprint(req.HostConfig.MemorySwap)
}

memorySwappiness := int64(-1)
if req.HostConfig.MemorySwappiness > 0 {
memorySwappiness = req.HostConfig.MemorySwappiness
}

pidLimit := int64(-1)
if req.HostConfig.PidsLimit > 0 {
pidLimit = req.HostConfig.PidsLimit
}

CpuQuota := int64(-1)
if req.HostConfig.CPUQuota != 0 {
CpuQuota = req.HostConfig.CPUQuota
}

globalOpt := ncTypes.GlobalCommandOptions(*h.Config)
createOpt := ncTypes.ContainerCreateOptions{
Stdout: nil,
@@ -134,6 +180,7 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
Pull: "missing", // nerdctl default.
StopSignal: stopSignal,
StopTimeout: stopTimeout,
CidFile: req.HostConfig.ContainerIDFile, // CidFile write the container ID to the file
// #endregion

// #region for platform flags
@@ -147,23 +194,26 @@ func (h *handler) create(w http.ResponseWriter, r *http.Request) {
// #region for resource flags
CPUShares: uint64(req.HostConfig.CPUShares), // CPU shares (relative weight)
Memory: memory, // memory limit (in bytes)
CPUQuota: -1, // nerdctl default.
MemorySwappiness64: -1, // nerdctl default.
PidsLimit: -1, // nerdctl default.
CPUQuota: CpuQuota, // CPUQuota limits the CPU CFS (Completely Fair Scheduler) quota
MemorySwappiness64: memorySwappiness, // Tuning container memory swappiness behaviour
PidsLimit: pidLimit, // PidsLimit specifies the tune container pids limit
Cgroupns: defaults.CgroupnsMode(), // nerdctl default.
MemoryReservation: memoryReservation, // Memory soft limit (in bytes)
MemorySwap: memorySwap, // Total memory usage (memory + swap); set `-1` to enable unlimited swap
Ulimit: ulimits, // List of ulimits to be set in the container
CPUPeriod: uint64(req.HostConfig.CPUPeriod),
// #endregion

// #region for user flags
User: req.User,
GroupAdd: []string{}, // nerdctl default.
User: req.User,
// #endregion

// #region for security flags
SecurityOpt: []string{}, // nerdctl default.
CapAdd: capAdd,
CapDrop: []string{}, // nerdctl default.
CapDrop: capDrop,
Privileged: req.HostConfig.Privileged,
// #endregion

// #region for runtime flags
Runtime: defaults.Runtime, // nerdctl default.
// #endregion
Loading