FROM ubuntu:18.04
RUN apt-get update \
    && apt-get install -y \
    wget \
    gnupg 
RUN wget -O awstoe.gpg https://awstoe-us-west-2.s3.us-west-2.amazonaws.com/latest/assets/awstoe.gpg \
    && gpg --import awstoe.gpg | grep "public key" | cut -d ' ' -f 3 | xargs gpg --fingerprint \
    && wget https://awstoe-us-west-2.s3.us-west-2.amazonaws.com/latest/linux/amd64/awstoe \
    && wget https://awstoe-us-west-2.s3.us-west-2.amazonaws.com/latest/linux/amd64/awstoe.sig \
    && gpg --verify awstoe.sig awstoe \
    && chmod +x awstoe \
    && mv awstoe /usr/bin
COPY . /ami-imagebuilder-cdk
ENTRYPOINT ["awstoe"]
CMD ["-h"]
