Unverified Commit 377fddfa authored by Lafif Astahdziq's avatar Lafif Astahdziq Committed by GitHub

fix: missing semicolon on Dockerfile (#39142)

The commit https://github.com/vercel/next.js/commit/0a781dd67510b679db178b17e30a1a06bb912398 changes the docker examples to use `if..elif..else`

it is working fine tor the `with-docker` example, but not working for the `with-docker-compose` and `with-docker-multi-env` examples due to a missing semicolon.

Fix #39085



## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
parent 70e4cf6d
...@@ -6,9 +6,9 @@ WORKDIR /app ...@@ -6,9 +6,9 @@ WORKDIR /app
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
# Omit --production flag for TypeScript devDependencies # Omit --production flag for TypeScript devDependencies
RUN \ RUN \
if [ -f yarn.lock ] then yarn install --frozen-lockfile; \ if [ -f yarn.lock ]; then yarn install --frozen-lockfile; \
elif [ -f package-lock.json ] then npm ci; \ elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ] then yarn global add pnpm && pnpm i; \ elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \
fi fi
......
...@@ -7,9 +7,9 @@ WORKDIR /app ...@@ -7,9 +7,9 @@ WORKDIR /app
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
# Omit --production flag for TypeScript devDependencies # Omit --production flag for TypeScript devDependencies
RUN \ RUN \
if [ -f yarn.lock ] then yarn install --frozen-lockfile; \ if [ -f yarn.lock ]; then yarn install --frozen-lockfile; \
elif [ -f package-lock.json ] then npm ci; \ elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ] then yarn global add pnpm && pnpm i; \ elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \
fi fi
......
...@@ -8,9 +8,9 @@ WORKDIR /app ...@@ -8,9 +8,9 @@ WORKDIR /app
# Install dependencies based on the preferred package manager # Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \ RUN \
if [ -f yarn.lock ] then yarn --frozen-lockfile;\ if [ -f yarn.lock ]; then yarn --frozen-lockfile;\
elif [ -f package-lock.json ] then npm ci;\ elif [ -f package-lock.json ]; then npm ci;\
elif [ -f pnpm-lock.yaml ] then yarn global add pnpm && pnpm i;\ elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i;\
else echo "Lockfile not found." && exit 1;\ else echo "Lockfile not found." && exit 1;\
fi fi
......
...@@ -8,9 +8,9 @@ WORKDIR /app ...@@ -8,9 +8,9 @@ WORKDIR /app
# Install dependencies based on the preferred package manager # Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \ RUN \
if [ -f yarn.lock ] then yarn --frozen-lockfile; \ if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ] then npm ci; \ elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ] then yarn global add pnpm && pnpm i; \ elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \
fi fi
......
...@@ -8,9 +8,9 @@ WORKDIR /app ...@@ -8,9 +8,9 @@ WORKDIR /app
# Install dependencies based on the preferred package manager # Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \ RUN \
if [ -f yarn.lock ] then yarn --frozen-lockfile; \ if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ] then npm ci; \ elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ] then yarn global add pnpm && pnpm i; \ elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i; \
else echo "Lockfile not found." && exit 1; \ else echo "Lockfile not found." && exit 1; \
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment