#!/bin/bash

cd ../../ecs/dataimport/ || { echo "Error: ディレクトリ変更に失敗しました"; exit 1; }

pipenv update

docker pull python:3.12-slim-bookworm

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

docker build -t mbj-newdwh2021-staging-ecr . --no-cache

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

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