build: publish reproducible patched image
This commit is contained in:
parent
d4aea97dba
commit
6dc5a9428b
4 changed files with 65 additions and 37 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -10,22 +10,17 @@ WORKDIR /usr/src/app
|
|||
|
||||
FROM base AS deps
|
||||
|
||||
ARG USE_EDGE=false
|
||||
|
||||
COPY package*.json ./
|
||||
COPY vendor/ ./vendor/
|
||||
|
||||
RUN if [ "$USE_EDGE" = "true" ]; then \
|
||||
apt-get update && apt-get install -y --no-install-recommends git ca-certificates && \
|
||||
npm ci --only=production --ignore-scripts && \
|
||||
npm install --save-exact git+https://github.com/pedroslopez/whatsapp-web.js.git#main && \
|
||||
apt-get purge -y git ca-certificates && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*; \
|
||||
else \
|
||||
npm ci --only=production --ignore-scripts; \
|
||||
fi
|
||||
RUN npm ci --omit=dev --ignore-scripts
|
||||
|
||||
# Create the final stage
|
||||
FROM base
|
||||
ARG PATCH_COMMIT=2dd76538984ce44d23f59008bb50d997fcef28a2
|
||||
LABEL org.opencontainers.image.source="https://git.eddydevink.nl/eddy/wwebjs-api" \
|
||||
org.opencontainers.image.revision="$PATCH_COMMIT" \
|
||||
org.opencontainers.image.description="wwebjs-api with the WhatsApp Web serialized message ID patch"
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && \
|
||||
|
|
|
|||
Loading…
Reference in a new issue