template-web-astro/Dockerfile.static
Renovate [BOT] b9b51fa4f5
Some checks are pending
Build, check & Test / run (push) Waiting to run
Build Docker Image / build_docker (push) Waiting to run
Lint / run (push) Waiting to run
chore(deps): update docker.io/node docker tag to v22 (#22)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| docker.io/node | stage | major | `20-alpine` -> `22-alpine` |
| docker.io/node | final | major | `20-alpine` -> `22-alpine` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQxNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->

Reviewed-on: #22
Co-authored-by: Renovate Bot <renovate@dzeio.com>
Co-committed-by: Renovate Bot <renovate@dzeio.com>
2024-06-26 14:16:54 +00:00

39 lines
707 B
Docker

# This Dockerfile allows you to run Astro in a static container (no server side)
#########
# Build #
#########
FROM docker.io/node:22-alpine as BUILD_IMAGE
# run as non root user
USER node
# go to user repository
WORKDIR /home/node
# Add package json
ADD --chown=node:node package.json package-lock.json ./
# install dependencies from package lock
RUN npm ci
# Add project files
ADD --chown=node:node . .
# build
RUN npm run build
##############
# Production #
##############
FROM docker.io/nginx:1-alpine
# go to NGINX folder
WORKDIR /usr/share/nginx/html
# Copy the nginx config
ADD ./nginx.conf /etc/nginx/nginx.conf
# Copy dist fro mthe build image
COPY --from=BUILD_IMAGE /home/node/dist ./