#!/bin/bash

cd ../../lambda/sap-data-decrypt || { echo "Error: ディレクトリ変更に失敗しました"; exit 1; }

aws ecr get-login-password --region ap-northeast-1 | docker login --username AWS --password-stdin 826466435614.dkr.ecr.ap-northeast-1.amazonaws.com

pipenv update

docker pull python:3.12-slim-bookworm

docker build -t mbj-newdwh2021-staging-sap-data-decrypt . --no-cache

docker tag mbj-newdwh2021-staging-sap-data-decrypt:latest 826466435614.dkr.ecr.ap-northeast-1.amazonaws.com/mbj-newdwh2021-staging-sap-data-decrypt:scan-point

docker push 826466435614.dkr.ecr.ap-northeast-1.amazonaws.com/mbj-newdwh2021-staging-sap-data-decrypt:scan-point

