#8169·infisical

Infisical does not include-imports when running in docker

Author: drtobbyasCreated Sep 16, 2026Updated Sep 16, 2026
Labelsdeployment:cloudproduct:secret-manager

Product

Secret Manager

Describe the bug

I have a folder path /qa that contains secret imports from the production environment / path alongside some direct secrets I added. The secret import does not show up when running in docker, it only shows the direct secret. While it works fine and includes imports when run in my local machine running fedora 42.

Here is my Dockerfile for reference

#
FROM node:22-alpine AS base

RUN apk add --no-cache bash sudo curl && \
    curl -1sLf \
    'https://artifacts-cli.infisical.com/setup.apk.sh' \
    | sh && \
    apk update && apk add infisical

# Stage 2: Dependencies (only rebuilds when package*.json changes)
FROM base AS deps

WORKDIR /usr/src/app

COPY package*.json ./

RUN npm ci

# Stage 3: Build (rebuilds when source code changes)
FROM deps AS builder

COPY . .

RUN npm run build

# Stage 4: Runtime image
FROM base AS runtime

WORKDIR /usr/src/app

COPY --from=deps /usr/src/app/package.json ./package.json
COPY --from=deps /usr/src/app/node_modules ./node_modules
COPY --from=builder /usr/src/app/dist ./dist

RUN addgroup -g 1001 -S nodejs && \
    adduser -S nestjs -u 1001 -G nodejs && \
    mkdir -p /usr/src/app/uploads && \
    chown -R nestjs:nodejs /usr/src/app

USER nestjs

EXPOSE 3305

CMD ["npm", "run", "start:prod"]

To Reproduce

  1. Create a basic nestjs app
  2. Build docker image using the provided config.
  3. Create a project in infisical, add some secrets. Create a folder path /qa, add secret import from the / path and some other direct secret to the /qa path. Create a service-token to fetch the /qa secrets. And use the token to launch your docker image application.

Expected behavior

It should resolve and include imported secrets when fetch using a service token or using infisical run

Screenshots

No response

Deployment Type

Infisical Cloud

Additional context

Image