|
| 1 | +FROM public.ecr.aws/ubuntu/ubuntu:22.04 AS core |
| 2 | + |
| 3 | +ARG DEBIAN_FRONTEND="noninteractive" |
| 4 | + |
| 5 | +# Install git, SSH, and other utilities |
| 6 | +RUN set -ex \ |
| 7 | + && echo 'Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/99use-gzip-compression \ |
| 8 | + && apt-get update \ |
| 9 | + && apt install -y -qq apt-transport-https gnupg ca-certificates \ |
| 10 | + && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ |
| 11 | + && apt-get install software-properties-common -y -qq --no-install-recommends \ |
| 12 | + && apt-add-repository -y ppa:git-core/ppa \ |
| 13 | + && apt-get update \ |
| 14 | + && apt-get install git=1:2.* -y -qq --no-install-recommends \ |
| 15 | + && git version \ |
| 16 | + && apt-get install -y -qq --no-install-recommends openssh-client \ |
| 17 | + && mkdir ~/.ssh \ |
| 18 | + && touch ~/.ssh/known_hosts \ |
| 19 | + && ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \ |
| 20 | + && chmod 600 ~/.ssh/known_hosts \ |
| 21 | + && apt-get install -y -qq --no-install-recommends \ |
| 22 | + apt-utils autoconf automake build-essential zip bzip2 \ |
| 23 | + bzr curl dirmngr \ |
| 24 | + e2fsprogs expect fakeroot file g++ gcc gettext gettext-base \ |
| 25 | + gzip iptables jq less libapr1 libaprutil1 \ |
| 26 | + llvm locales make mlocate \ |
| 27 | + netbase openssl patch rsync tar unzip wget \ |
| 28 | + && rm -rf /var/lib/apt/lists/* |
| 29 | + |
| 30 | +ENV LC_CTYPE="C.UTF-8" |
| 31 | + |
| 32 | +#=======================End of layer: core ================= |
| 33 | + |
| 34 | + |
| 35 | +FROM core AS tools |
| 36 | + |
| 37 | + |
| 38 | +# AWS Tools |
| 39 | +RUN curl -sS -o /usr/local/bin/kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.25.6/2023-01-30/bin/linux/amd64/kubectl \ |
| 40 | + && curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash \ |
| 41 | + && mv kustomize /usr/local/bin/ \ |
| 42 | + && chmod +x /usr/local/bin/kubectl /usr/local/bin/kustomize |
| 43 | + |
| 44 | +ARG APOLLO_ROVER_VERSION="0.14.0" |
| 45 | +RUN curl -sSL https://rover.apollo.dev/nix/v${APOLLO_ROVER_VERSION} | sh -s -- --elv2-license accept \ |
| 46 | + && mv $HOME/.rover/bin/rover /usr/local/bin/ && ln -sf /usr/local/bin/rover $HOME/.rover/bin/rover |
| 47 | + |
| 48 | +RUN curl -fsSL https://apt.cli.rs/pubkey.asc | tee -a /usr/share/keyrings/rust-tools.asc \ |
| 49 | + && curl -fsSL https://apt.cli.rs/rust-tools.list | tee /etc/apt/sources.list.d/rust-tools.list \ |
| 50 | + && apt update && apt -y -qq --no-install-recommends install xh |
| 51 | + |
| 52 | + |
| 53 | +#=======================End of layer: tools ================= |
| 54 | +FROM tools AS runtimes |
| 55 | + |
| 56 | + |
| 57 | +# Configure SSH |
| 58 | +COPY ssh_config /root/.ssh/config |
| 59 | + |
| 60 | +# docker run --rm -it -v $PWD:/app -v /var/run/docker.sock:/var/run/docker.sock --privileged --workdir /app toolbox docker build -f dataset-test -f docker/graphql-dgs/Dockerfile /app |
0 commit comments