Add Dockerfile for building Azurite with Caddy support
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user