Created
November 20, 2020 12:44
-
-
Save amacal/aaeed87ab99a6a215be7dcaac4e98adb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREV=$(pwd) | |
rm ../tmp/* -f || true | |
pipenv install --ignore-pipfile --python 3.9 | |
find . -type f | grep -Ev "v-env|Dockerfile|Makefile|Pipfile|requirements\.txt|\.env|test\.py$" | sort | zip -9 -X -r --quiet $PREV/../tmp/wikipedia-app.zip -@ | |
cd $(pipenv --venv)/lib/python3.9/site-packages/ | |
find . -type f | grep -v "__pycache__" | grep -v ".dist-info/" | sort | zip -9 -X -r --quiet $PREV/../tmp/wikipedia-libs.zip -@ | |
cd $PREV | |
cp Dockerfile ../tmp/ | |
docker build -t wikipedia-etl:latest ../tmp/ | |
aws ecr get-login-password | docker login --username AWS --password-stdin $(aws ecr describe-repositories | jq ".repositories[0].repositoryUri" -r) | |
docker tag wikipedia_etl:latest $(aws ecr describe-repositories | jq ".repositories[0].repositoryUri" -r):latest | |
docker push $(aws ecr describe-repositories | jq ".repositories[0].repositoryUri" -r):latest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment