Skip to content

Commit

Permalink
Use AWS Lambda Python 3.11 image
Browse files Browse the repository at this point in the history
  • Loading branch information
gjclark committed Sep 17, 2024
1 parent 69ed7ea commit c5fdd0b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 $@

Expand Down
1 change: 0 additions & 1 deletion build/lambda-ci.Dockerfile

This file was deleted.

4 changes: 4 additions & 0 deletions build/tea-dependency-builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM public.ecr.aws/lambda/python:3.11

RUN yum install -y git zip
RUN pip install pip-tools

0 comments on commit c5fdd0b

Please sign in to comment.