point-median-extension/Dockerfile
François Pelletier 6d1cc306c4 🗃️ refactor: Renommage du dossier de sortie de l'extension
- 🗃️ Renommage du dossier de sortie de  à  dans le Dockerfile, build.sh et README.md.
2025-07-01 07:18:50 -04:00

32 lines
1.1 KiB
Docker

# Stage 1: The Builder
# This stage takes a lightweight Alpine Linux image, installs the 'zip' utility,
# and then copies your extension files into it to create the packages.
FROM alpine:latest AS builder
# Set the working directory inside the container.
WORKDIR /extension
# Copy all the extension files into the working directory.
# Ensure your Dockerfile is in the same directory as these files.
COPY manifest.json .
COPY popup.html .
COPY popup.js .
COPY content.js .
COPY background.js .
COPY images/ ./images/
# Stage 2: The Final Package
# This stage is a minimal image whose only purpose is to hold the final packages.
# Using alpine instead of scratch and adding a CMD makes it easier to interact with.
FROM alpine:latest
# Set the output directory.
WORKDIR /output
# Create a subdirectory for the Chrome extension and copy all files into it.
RUN mkdir point-median-extension
COPY --from=builder /extension/ ./point-median-extension/
# Add a default command to list the contents of the output directory.
# This makes the container runnable and prevents the "no command specified" error.
CMD ["ls", "-l"]