File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ typed-ast = "*"
1616
1717[packages ]
1818sqlalchemy = " ==1.3.13"
19- psycopg2-binary = " ==2.8.6"
2019jmespath = " ==0.9.4"
2120jsonpatch = " ==1.25"
2221pyyaml = " ==5.4"
@@ -30,6 +29,7 @@ colr = "*"
3029python-dateutil = " *"
3130boto3 = " ==1.17.9"
3231botocore = " ==1.20.9"
32+ psycopg2-binary = " ==2.9.1"
3333
3434[requires ]
3535python_version = " 3.9"
Original file line number Diff line number Diff line change @@ -2,13 +2,10 @@ FROM python:3.9-slim
22
33ADD https://github.com/amacneil/dbmate/releases/download/v1.11.0/dbmate-linux-arm64 /app/dbmate
44RUN chmod a+x /app/dbmate
5- RUN apt-get update && apt-get install -y libpq-dev
65COPY requirements.txt /app/
76COPY migrations /app/migrations
87WORKDIR /app/
98RUN pip install -r requirements.txt
10- COPY psycopg2_binary-2.8.6-cp39-cp39-linux_aarch64.whl /app/
11- RUN pip install /app/psycopg2_binary-2.8.6-cp39-cp39-linux_aarch64.whl
129EXPOSE 5000/tcp
1310COPY introspector.py /app/
1411COPY introspector /app/introspector
Original file line number Diff line number Diff line change 55PACKAGE=$1
66VERSION=$2
77
8- export DOCKER_BUILDKIT=1
9- WHEEL_TAG=goldfig/tempbuildwheel:latest
10- docker build --platform linux/arm64 -f docker/BuildWheelDockerFile -t $WHEEL_TAG .
11-
12- CONTAINER_ID=$( docker run -t -d --rm $WHEEL_TAG )
13- echo " Container ID $CONTAINER_ID "
14- WHEEL_FILE=$( docker exec $CONTAINER_ID /usr/local/bin/pip cache list --format abspath)
15- echo " Wheel file $WHEEL_FILE "
16- LOCAL_WHEEL=psycopg2_binary-2.8.6-cp39-cp39-linux_aarch64.whl
17- docker cp $CONTAINER_ID :$WHEEL_FILE $LOCAL_WHEEL
18- docker stop $CONTAINER_ID
19-
208echo " Building package ${PACKAGE} "
219
22- pipenv lock -r > requirements.tmp
23- sed ' /psycopg2-binary.*/d' requirements.tmp > requirements.txt
24- rm requirements.tmp
10+ pipenv lock -r > requirements.txt
2511
2612INTROSPECTOR_DOCKER_REPO=${DOCKER_REPO:- goldfig}
2713IMAGE=" ${INTROSPECTOR_DOCKER_REPO} /${PACKAGE} :arm64-${VERSION} "
You can’t perform that action at this time.
0 commit comments