Skip to content

Commit

Permalink
chore: Remove repetition on Dockerfile arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ereslibre committed Jan 17, 2023
1 parent 72eca41 commit b3c123f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.wasi-builder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG WASM_BASE=20220116
ARG WASM_BASE
FROM ghcr.io/vmware-labs/wasm-base:${WASM_BASE}
ARG WASI_SDK_VERSION=19
ARG WASI_SDK_VERSION
ENV WASI_SDK=wasi-sdk-${WASI_SDK_VERSION}
ENV WASI_SDK_ROOT=/wasi-sdk
ENV WASI_SDK_PATH=${WASI_SDK_ROOT}
Expand Down
6 changes: 4 additions & 2 deletions Makefile.builders
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
BUILDER_ROOT_DIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))

WASM_BASE_TAG ?= $(shell git rev-parse --short HEAD)

.PHONY: wasm-base
wasm-base:
docker build --build-arg BINARYEN_VERSION=111 -f ${BUILDER_ROOT_DIR}/Dockerfile.wasm-base -t ghcr.io/vmware-labs/wasm-base:20220116 ${BUILDER_ROOT_DIR}
docker build --build-arg BINARYEN_VERSION=111 -f ${BUILDER_ROOT_DIR}/Dockerfile.wasm-base -t ghcr.io/vmware-labs/wasm-base:$(WASM_BASE_TAG) ${BUILDER_ROOT_DIR}

.PHONY: wasi-builder-19
wasi-builder-19: wasm-base
docker build --build-arg WASI_SDK_VERSION=19 -f ${BUILDER_ROOT_DIR}/Dockerfile.wasi-builder -t ghcr.io/vmware-labs/wasi-builder:19 ${BUILDER_ROOT_DIR}
docker build --build-arg WASM_BASE=$(WASM_BASE_TAG) --build-arg WASI_SDK_VERSION=19 -f ${BUILDER_ROOT_DIR}/Dockerfile.wasi-builder -t ghcr.io/vmware-labs/wasi-builder:19 ${BUILDER_ROOT_DIR}
2 changes: 1 addition & 1 deletion php/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG WASI_SDK_VERSION=19
ARG WASI_SDK_VERSION
FROM ghcr.io/vmware-labs/wasi-builder:${WASI_SDK_VERSION}
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
bison \
Expand Down
2 changes: 1 addition & 1 deletion ruby/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG WASI_SDK_VERSION=19
ARG WASI_SDK_VERSION
FROM ghcr.io/vmware-labs/wasi-builder:${WASI_SDK_VERSION}
RUN DEBIAN_FRONTEND=noninteractive apt install -y \
ruby \
Expand Down

0 comments on commit b3c123f

Please sign in to comment.