Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ndcum 1315 #6

Merged
merged 23 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile.aws-sam-cli-build-image-python3.10
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM linuxbrew/brew:latest
FROM homebrew/brew:latest

RUN brew install groff
RUN brew install libyaml
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aws-sam-cli-build-image-python3.9
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM linuxbrew/brew:latest
FROM homebrew/brew:latest

RUN brew install groff
RUN brew install libyaml
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.py310
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM nsidc/aws-sam-cli-build-image-python3.10:latest

RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH "$PATH:/root/.local/bin"
RUN curl -sSL https://install.python-poetry.org | python3.10 -
ENV PATH "$PATH:/root/.local/bin:/home/linuxbrew/.local/bin"

COPY sam_build.sh /sam_build.sh

Expand Down
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ docker build -t ${DOCKER_IMAGE_TAG} "${BUILDER_DIR}" -f "${DOCKERFILE}"

# run the build script on the docker container
docker run \
--user root \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "${PROJECT_DIR}":"${PROJECT_DIR}" \
-e PROJECT_DIR="${PROJECT_DIR}" \
Expand Down
4 changes: 3 additions & 1 deletion sam_build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -ex

# run this on the docker container; works on host too if environment variables
# set and sam is installed
Expand Down Expand Up @@ -31,7 +31,9 @@ export SAM_CLI_TELEMETRY=0

REQUIREMENTS_FILE="${PROJECT_DIR}/src/requirements.txt"
if [ ! -f "${REQUIREMENTS_FILE}" ]; then
echo "No requirements file found, generating one..."
cd "${PROJECT_DIR}"
poetry self add poetry-plugin-export
poetry export -f requirements.txt --output "${REQUIREMENTS_FILE}"
cd -
fi
Expand Down