Skip to content

Commit

Permalink
add buildx back; move ARG to the top of the file
Browse files Browse the repository at this point in the history
  • Loading branch information
zsteinkamp authored and ivanitskiy committed Jul 3, 2023
1 parent 14399e5 commit 197b39b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG NGINX_VERSION=1.24.0

FROM node:18 AS builder
WORKDIR /app
COPY package.json package-lock.json ./
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 197b39b

Please sign in to comment.