nerdctl compose fails, profile 'nerdctl-default' does not exist #1237
-
| DescriptionI'm developing a nodejs app suite with some microservices and an API. In order to perform integration testing before any deployment, I have a step in my Gitlab CI that uses a docker-compose.yaml to spawn all these MS and API and launch some tests against the API. All of this happens in a Kube cluster based on containerd, so I'm trying to use  When my CI steps run, it fails with some  Steps to reproduce the issueDescribe the results you received and expectedHere is my docker-compose.yaml: version: "3.9"
networks:
  testinteg:
    name: testinteg
services:
  mongosrv:
    container_name: "mongosrv"
    image: registry.gitlab.com/casetonpote1/ctp-utils/mongosrv:testinteg
    command: [ "--auth", "--dbpath", "/mongo/data/db" ]
    pull_policy: always
    networks:
      - testinteg
  users:
    container_name: "users"
    image: registry.gitlab.com/casetonpote1/backend-users:dev
    environment:
      NODE_ENV: "dev"
      PORT: 80
      LOG_LEVEL: "debug"
      LOG_FORMAT: "splat,simple"
      PASSWORD_JWT_SECRET: "anothersecurestring"
      PASSWORD_JWT_TTL: "30s"
      SSL_ENABLED: "false"
      MOCK_DB: "false"
      MONGO_DB: "casetespotes"
      MONGO_HOST: "mongosrv"
      MONGO_USER: "usersRW"
      MONGO_PASSWD: "password"
    depends_on:
      - mongosrv
    networks:
      - testinteg
  stories:
    container_name: "stories"
    image: registry.gitlab.com/casetonpote1/backend-stories:dev
    environment:
      NODE_ENV: "dev"
      PORT: 80
      LOG_LEVEL: "debug"
      LOG_FORMAT: "splat,simple"
      SSL_ENABLED: "false"
      MOCK_DB: "false"
      MONGO_DB: "casetespotes"
      MONGO_HOST: "mongosrv"
      MONGO_USER: "storiesRW"
      MONGO_PASSWD: "password"
    depends_on:
      - mongosrv
    networks:
      - testinteg
  profiles:
    container_name: "profiles"
    image: registry.gitlab.com/casetonpote1/backend-profiles:dev
    environment:
      NODE_ENV: "dev"
      PORT: 80
      LOG_LEVEL: "debug"
      LOG_FORMAT: "splat,simple"
      SSL_ENABLED: "false"
      MOCK_DB: "false"
      MONGO_DB: "casetespotes"
      MONGO_HOST: "mongosrv"
      MONGO_USER: "profilesRW"
      MONGO_PASSWD: "password"
      MOCK_GEO: "true"
    depends_on:
      - mongosrv
    networks:
      - testinteg
  sessions:
    container_name: "sessions"
    image: registry.gitlab.com/casetonpote1/backend-sessions:dev
    environment:
      NODE_ENV: "dev"
      PORT: 80
      LOG_LEVEL: "debug"
      LOG_FORMAT: "splat,simple"
      APP_JWT_SECRET: "anothersecurestring"
      APP_JWT_TTL: "30s"
      REFRESH_ALLOWED: "7d"
      SSL_ENABLED: "false"
      MOCK_DB: "false"
      MONGO_DB: "casetespotes"
      MONGO_HOST: "mongosrv"
      MONGO_USER: "authenticater"
      MONGO_PASSWD: "password"
      MS_USERS_ENDPOINT: "http://users"
    depends_on:
      - mongosrv
    networks:
      - testinteg
  linkings:
    container_name: "linkings"
    image: registry.gitlab.com/casetonpote1/backend-linkings:dev
    environment:
      NODE_ENV: "dev"
      PORT: 80
      LOG_LEVEL: "debug"
      LOG_FORMAT: "splat,simple"
      SSL_ENABLED: "false"
      MOCK_DB: "false"
      MONGO_DB: "casetespotes"
      MONGO_HOST: "mongosrv"
      MONGO_USER: "linkingsRW"
      MONGO_PASSWD: "password"
    depends_on:
      - mongosrv
    networks:
      - testinteg
  api-gateway:
    container_name: "api-gateway"
    image: registry.gitlab.com/casetonpote1/api-gateway-public:test
    environment:
      NODE_ENV: "dev"
      PORT: 80
      LOG_LEVEL: "debug"
      LOG_FORMAT: "splat,simple"
      SSL_ENABLED: "false"
      AUTH_SOURCE: "api-public-dev"
      MS_STORIES_ENDPOINT: "http://stories"
      MS_USERS_ENDPOINT: "http://users"
      MS_PROFILES_ENDPOINT: "http://profiles"
      MS_SESSIONS_ENDPOINT: "http://sessions"
      MS_LINKINGS_ENDPOINT: "http://linkings"
    depends_on:
      - users
      - stories
      - profiles
      - sessions
      - linkings
    networks:
      - testintegAnd here is my CI step: integrationtesting:
  tags:
    - kubernetes
  image: ghcr.io/containerd/nerdctl:v0.21.0
  stage: tests
  before_script:
    - nerdctl compose -f test_integ/dependencies/docker-compose.yaml up -d --debug-full
  script:
    - nerdctl compose -f test_integ/dependencies/tester-compose.yaml up --debug-full
  after_script:
    - nerdctl compose -f test_integ/dependencies/docker-compose.yaml -f test_integ/dependencies/tester-compose.yaml down
  dependencies:
    - buildapitest
    - buildtestertestWhere dependencies are steps where required images are created. These steps are successful. All the images pulling seems to be ok, but when creating the containers I get this error messages in the CI logs: What version of nerdctl are you using?ghcr.io/containerd/nerdctl:v0.21.0 Are you using a variant of nerdctl? (e.g., Rancher Desktop)No response Host information$ nerdctl info | 
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
| Seems like you need to follow the following guideline to add AppArmor Profile for nerdctl https://github.com/containerd/nerdctl#features-present-in-nerdctl-but-not-present-in-docker | 
Beta Was this translation helpful? Give feedback.
-
| 
 This is just a negligible debug message, not a fatal error. If your container doesn't work as expected, it's probably failing for other reason(s). I'd suggest trying  | 
Beta Was this translation helpful? Give feedback.
This is just a negligible debug message, not a fatal error.
If your container doesn't work as expected, it's probably failing for other reason(s).
I'd suggest trying
nerdctl run hello-worldbefore composing up a complex YAML.