# syntax=docker/dockerfile:1.5.0 # This dockerfile uses new-ish buildkit syntax. # Details on how to run are on the bottom of the file. ARG BASE_IMAGE=pyenv:311 FROM $BASE_IMAGE ENV HOME=/root ENV PIP_ROOT_USER_ACTION=ignore ## Install Prerequisites RUN < aws2.pub cat aws2.pub gpg --import aws2.pub # Set the trust level of the key KEY_FPATH=aws2.pub #KEY_ID=$(gpg --list-packets <"$KEY_FPATH" | awk '$1=="keyid:"{print$2;exit}') KEY_ID=FB5DB77FD5C118B80511ADA8A6310ACC4672475C echo "KEY_ID = $KEY_ID" (echo 5; echo y; echo save) | gpg --command-fd 0 --no-tty --no-greeting -q --edit-key "$KEY_ID" trust # Download the signature and verify the CLI tool is signed by amazon curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip.sig" -o "awscli-exe-linux-x86_64.zip.sig" gpg --verify awscli-exe-linux-x86_64.zip.sig awscli-exe-linux-x86_64.zip # Unzip the downloaded installer 7z x awscli-exe-linux-x86_64.zip # If you want to install somewhere else, change the PREFIX variable PREFIX="$HOME/.local" mkdir -p "$PREFIX"/bin ./aws/install --install-dir "$PREFIX/aws-cli" --bin-dir "$PREFIX/bin" --update "$PREFIX"/bin/aws --version EOF WORKDIR /root RUN mkdir -p /root/code # Stage just enough of the geowatch source to run the build # (this lets us modify supporting scripts while maintaining docker caches) COPY setup.py /root/code/geowatch/ COPY pyproject.toml /root/code/geowatch/ COPY run_developer_setup.sh /root/code/geowatch/ COPY dev/make_strict_req.sh /root/code/geowatch/dev/make_strict_req.sh COPY requirements /root/code/geowatch/requirements COPY geowatch /root/code/geowatch/geowatch #RUN echo $(pwd) ARG BUILD_STRICT=0 #SHELL ["/bin/bash", "--login", "-c"] ARG DEV_TRACE="" # Setup primary dependencies # Note: special syntax for caching deps # https://pythonspeed.com/articles/docker-cache-pip-downloads/ RUN --mount=type=cache,target=/root/.cache <