From cb6e5175add0b0309d71ff4761d5a05401f8f054 Mon Sep 17 00:00:00 2001 From: Slawomir Koszewski Date: Fri, 27 Feb 2026 07:22:32 +0100 Subject: [PATCH] Add Dockerfile for building Azurite with Caddy support --- Dockerfile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..abcd288 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +# syntax=docker/dockerfile + +# Build +FROM node:20-alpine AS build +WORKDIR /app +ARG AZURITE_VER=v3.35.0 +RUN apk add --no-cache git +RUN git clone --branch "${AZURITE_VER}" --depth 1 https://github.com/Azure/Azurite.git azurite +WORKDIR /app/azurite +RUN npm ci +RUN npm run build + +# Pull Caddy +FROM caddy:2-alpine AS caddy + +# Build final image on top of Node alpine +FROM node:20-alpine +WORKDIR /app +COPY --from=caddy /usr/bin/caddy /usr/bin/caddy +COPY --from=caddy /etc/caddy /etc/caddy +COPY --from=build /app/azurite/package*.json ./azurite/ +COPY --from=build /app/azurite/dist/src ./azurite/src +WORKDIR /app/azurite +RUN npm pkg set scripts.prepare="echo no-prepare" +RUN npm ci --omit=dev --unsafe-perm +WORKDIR /app