Skip to content

Commit

Permalink
Default to not using --link
Browse files Browse the repository at this point in the history
  • Loading branch information
jsierles committed Sep 26, 2024
1 parent b322778 commit 19068cf
Show file tree
Hide file tree
Showing 49 changed files with 101 additions and 101 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Options are saved between runs into `package.json`. To invert a boolean options,
* `--legacy-peer-deps` - [ignore peer dependencies](https://docs.npmjs.com/cli/v7/using-npm/config#legacy-peer-deps).
* `--litefs` - configure and enable [litefs](https://fly.io/docs/litefs/).
* `--nginxRoot=DIR` - serve static files from given directory via [nginx](https://www.nginx.com/).
* `--no-link` - don't add [--link](https://docs.docker.com/engine/reference/builder/#copy---link) to COPY statements. Some tools (like at the moment, [buildah](https://www.redhat.com/en/topics/containers/what-is-buildah)) don't yet support this feature.
* `--link` - Add [--link](https://docs.docker.com/engine/reference/builder/#copy---link) to COPY statements. Some tools, including [buildah](https://www.redhat.com/en/topics/containers/what-is-buildah)) or [Buildkit](https://docs.docker.com/build/buildkit/) don't properly support this feature.
* `--port=n` - expose port (default may vary based on framework, but otherwise is `3000`)
* `--swap=n` - allocate swap space. See [falloc options](https://man7.org/linux/man-pages/man1/fallocate.1.html#OPTIONS) for suffixes
* `--windows` - make Dockerfile work for Windows users that may have set `git config --global core.autocrlf true`.
Expand Down
2 changes: 1 addition & 1 deletion gdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const defaults = {
distroless: false,
ignoreScripts: false,
legacyPeerDeps: false,
link: true,
link: false,
litefs: false,
nginxRoot: '',
port: 0,
Expand Down
4 changes: 2 additions & 2 deletions test/base/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apk update && \
apk add build-base gyp pkgconfig python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/build-secret/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN --mount=type=secret,id=DATABASE_URL \
Expand Down
4 changes: 2 additions & 2 deletions test/base/build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN npm run tsc
Expand Down
4 changes: 2 additions & 2 deletions test/base/bun/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3

# Install node modules
COPY --link bun.lockb package.json ./
COPY bun.lockb package.json ./
RUN bun install --ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/cache-bun/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ RUN --mount=type=cache,id=cache,target=/var/cache/apt \
apt-get install --no-install-recommends -y build-essential pkg-config python-is-python3

# Install node modules
COPY --link bun.lockb package.json ./
COPY bun.lockb package.json ./
RUN --mount=type=cache,id=bun,target=/root/.bun \
bun install

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN bun run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/cache-npm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ RUN --mount=type=cache,id=cache,target=/var/cache/apt \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN --mount=type=cache,id=npm,target=/app/.npm \
npm ci --include=dev

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN npm run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/cache-pnpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ RUN --mount=type=cache,id=cache,target=/var/cache/apt \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package.json pnpm-lock.yaml ./
COPY package.json pnpm-lock.yaml ./
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm install --frozen-lockfile --prod=false

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN pnpm run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/cache-yarn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ RUN --mount=type=cache,id=cache,target=/var/cache/apt \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package.json yarn.lock ./
COPY package.json yarn.lock ./
RUN --mount=type=cache,id=yarn,target=/usr/local/share/.cache/yarn/ \
yarn install --frozen-lockfile --production=false

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN yarn run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/cmd-entrypoint/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
6 changes: 3 additions & 3 deletions test/base/defer-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp openssl pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Generate Prisma Client
COPY --link prisma .
COPY prisma .
RUN npx prisma generate

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN npm run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/distroless/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/envargs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN npm run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/fluent-ffmpeg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package.json ./
COPY package.json ./
RUN npm install

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/git/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential git node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package.json ./
COPY package.json ./
RUN npm install

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/ignore-scripts/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --ignore-scripts

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/instructions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN npm run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/legacy-peer-deps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --legacy-peer-deps

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/litefs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/packages/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential libicu-dev node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN npm run build
Expand Down
4 changes: 2 additions & 2 deletions test/base/port/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/puppeteer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package.json ./
COPY package.json ./
RUN npm install

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/swap/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
4 changes: 2 additions & 2 deletions test/base/version/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci

# Copy application code
COPY --link . .
COPY . .


# Final stage for app image
Expand Down
6 changes: 3 additions & 3 deletions test/base/windows/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ RUN apt-get update -qq && \
apt-get install --no-install-recommends -y build-essential node-gyp openssl pkg-config python-is-python3

# Install node modules
COPY --link package-lock.json package.json ./
COPY package-lock.json package.json ./
RUN npm ci --include=dev

# Generate Prisma Client
COPY --link prisma .
COPY prisma .
RUN npx prisma generate

# Copy application code
COPY --link . .
COPY . .

# Build application
RUN npm run build
Expand Down
Loading

0 comments on commit 19068cf

Please sign in to comment.