diff --git a/Dockerfile b/Dockerfile index c1f0386..75a098e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +ARG NGINX_VERSION=1.24.0 + FROM node:18 AS builder WORKDIR /app COPY package.json package-lock.json ./ @@ -7,7 +9,6 @@ RUN --mount=type=cache,target=/app/.npm \ COPY . . RUN npm run build -ARG NGINX_VERSION=1.24.0 FROM nginx:${NGINX_VERSION} COPY --from=builder /app/dist/acme.js /usr/lib/nginx/njs_modules/acme.js COPY ./examples/nginx.conf /etc/nginx/nginx.conf diff --git a/Makefile b/Makefile index fbf88ec..1a0b075 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ build: ## Run npm run build .PHONY: docker-build docker-build: ## Build docker image - $(DOCKER) build $(DOCKER_BUILD_FLAGS) -t $(PROJECT_NAME) . + $(DOCKER) buildx build $(DOCKER_BUILD_FLAGS) -t $(PROJECT_NAME) . .PHONY: docker-copy