diff --git a/Makefile b/Makefile index 35d8c48d..1ef1e642 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ DOCKER := docker # On Linux we need to do a bit of userid finagling so that the output files # end up being owned by us and not by root. On Mac this works out of the box. DOCKER_USER_ARG := --user "$(shell id -u):$(shell id -g)" -DOCKER_COMMAND = $(DOCKER) run --rm $(DOCKER_USER_ARG) -v "$$PWD":/var/task $(DOCKER_ARGS) +DOCKER_COMMAND = $(DOCKER) run --rm $(DOCKER_USER_ARG) -v "$$PWD":/var/task $(DOCKER_ARGS) --entrypoint "" PYTHON := python3 BUILD_VENV := $(DIR)/.venv @@ -57,7 +57,6 @@ Makefile.config: include Makefile.config ifdef DOCKER_COMMAND -#AMAZON_LINUX = $(DOCKER_COMMAND) amazonlinux:2 DOCKER_DEPENDENCY_BUILDER = $(DOCKER_COMMAND) tea-dependency-builder endif @@ -106,7 +105,7 @@ $(BUILD_VENV): requirements/requirements-make.txt $(DIR)/thin-egress-app-dependencies.zip: requirements/requirements.txt $(REQUIREMENTS_DEPS) rm -rf $(DIR)/python @mkdir -p $(DIR)/python - $(AMAZON_LINUX) build/dependency_builder.sh "$(DIR)/thin-egress-app-dependencies.zip" "$(DIR)" + $(DOCKER_DEPENDENCY_BUILDER) build/dependency_builder.sh "$(DIR)/thin-egress-app-dependencies.zip" "$(DIR)" .SECONDARY: $(DIST_MD_RESOURCES) $(DIST_MD_RESOURCES): $(DIR)/code/%.html: %.md $(BUILD_VENV) @@ -271,8 +270,8 @@ cleandeploy: ############### .PHONY: tea-dependency-builder -tea-dependency-builder: build/lambda-ci.Dockerfile - $(DOCKER) build -f build/lambda-ci.Dockerfile -t tea-dependency-builder ./build +tea-dependency-builder: build/tea-dependency-builder.Dockerfile + $(DOCKER) build -f build/tea-dependency-builder.Dockerfile -t tea-dependency-builder ./build @mkdir -p $(EMPTY) @touch $@ diff --git a/build/lambda-ci.Dockerfile b/build/lambda-ci.Dockerfile deleted file mode 100644 index bc9b31f5..00000000 --- a/build/lambda-ci.Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM amazonlinux:2 \ No newline at end of file diff --git a/build/tea-dependency-builder.Dockerfile b/build/tea-dependency-builder.Dockerfile new file mode 100644 index 00000000..bf05bdab --- /dev/null +++ b/build/tea-dependency-builder.Dockerfile @@ -0,0 +1,4 @@ +FROM public.ecr.aws/lambda/python:3.11 + +RUN yum install -y git zip +RUN pip install pip-tools \ No newline at end of file