Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(docker): test alpine 3.21 + Node.js 20 #5741

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1757,6 +1757,8 @@ jobs:
- alpine-3.17-amd64-openssl-3.0.x
- alpine-3.21-arm64-openssl-3.0.x
- alpine-3.21-amd64-openssl-3.0.x
- alpine-3.21-node-20-arm64-openssl-3.0.x
- alpine-3.21-node-20-amd64-openssl-3.0.x
- alpine-latest-amd64-openssl-3.0.x
- alpine-latest-arm64-openssl-3.0.x
- amazonlinux-2022-amd64-openssl-3.0.x
Expand Down
42 changes: 42 additions & 0 deletions docker/alpine-3.21-node-20-amd64-openssl-3.0.x/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# syntax=docker/dockerfile:1

FROM node:20-alpine3.21

WORKDIR /usr/src/app
COPY --from=app . ./
COPY --from=utils . ./

RUN apk update

# Only OpenSSL 3 is expected to be on this system
RUN if [ ! -e /usr/lib/libssl.so.3 ]; then echo 'OpenSSL 3 not found in /usr/lib/libssl.so.3'; exit 1; fi
RUN if [ -e /usr/lib/libssl.so.1.1 ]; then echo 'OpenSSL 1.1 must not be installed (found in /usr/lib/libssl.so.1.1)'; exit 1; fi

# Ensure the old platform-specific paths are not containing OpenSSL
RUN if [ -e /lib/libssl.so.3 ]; then echo '/lib/libssl.so.3 must not exist'; exit 1; fi
RUN if [ -e /lib/libssl.so.1.1 ]; then echo '/lib/libssl.so.1.1'; exit 1; fi

# expected target platform for Prisma, retrieved by `prisma -v`
ARG EXPECTED_PRISMA_TARGET_PLATFORM="linux-musl-openssl-3.0.x"
ARG PRISMA_ENGINES_MIRROR
ARG PRISMA_CLIENT_ENGINE_TYPE
ARG PRISMA_CLI_QUERY_ENGINE_TYPE
ARG CI
ARG DEBUG
ARG PRISMA_TELEMETRY_INFORMATION

ENV PRISMA_ENGINES_MIRROR=$PRISMA_ENGINES_MIRROR
ENV PRISMA_CLIENT_ENGINE_TYPE=$PRISMA_CLIENT_ENGINE_TYPE
ENV PRISMA_CLI_QUERY_ENGINE_TYPE=$PRISMA_CLI_QUERY_ENGINE_TYPE
ENV CI=$CI
ENV DEBUG=$DEBUG
ENV PRISMA_TELEMETRY_INFORMATION=$PRISMA_TELEMETRY_INFORMATION
ENV EXPECTED_PRISMA_TARGET_PLATFORM=$EXPECTED_PRISMA_TARGET_PLATFORM

RUN npm i -g pnpm@8
RUN pnpm install
RUN ./version.sh
RUN pnpm prisma generate

CMD node server.js
EXPOSE 3000
7 changes: 7 additions & 0 deletions docker/alpine-3.21-node-20-amd64-openssl-3.0.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# OS support: alpine-3.21-node-20-amd64-openssl-3.0.x

- Base Docker image: `node:20-alpine3.21`
- OS: Linux Alpine 3.21
- Arch: amd64 (x86_64)
- OpenSSL location: `/usr/lib/libssl.so.3`
- Binary target: `linux-musl-openssl-3.0.x`
17 changes: 17 additions & 0 deletions docker/alpine-3.21-node-20-amd64-openssl-3.0.x/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "@prisma/alpine-3.21-node-20-amd64-openssl-3.0.x",
"license": "MIT",
"devDependencies": {
"@types/node": "18.19.67",
"prisma": "6.1.0-dev.34",
"ts-node": "10.9.2",
"typescript": "5.6.3"
},
"scripts": {
"start": "node server.js"
},
"dependencies": {
"@prisma/client": "6.1.0-dev.34",
"express": "4.21.1"
}
}
Loading
Loading