2021-01-28 04:03:18 -06:00
FROM debian:testing-20210111-slim
# Use ARG so as not to persist environment variable in image
2022-03-16 06:25:54 -05:00
ARG GOVERSION = 1 .17.8 \
GO_CHECKSUM = 980e65a863377e69fd9b67df9d8395fd8e93858e7a24c9f55803421e453f4f99 \
2021-01-28 04:03:18 -06:00
DEBIAN_FRONTEND = noninteractive
ENV PATH = /usr/local/go/bin:$PATH \
GOPATH = /go
RUN apt update && apt install -yq curl git make
RUN curl -fLO https://storage.googleapis.com/golang/go${ GOVERSION } .linux-amd64.tar.gz && \
echo " ${ GO_CHECKSUM } go ${ GOVERSION } .linux-amd64.tar.gz " | sha256sum --check --strict --status && \
tar -xzf go${ GOVERSION } .linux-amd64.tar.gz -C /usr/local
2018-12-21 05:26:31 -06:00
2020-04-08 07:13:05 -05:00
RUN git clone https://github.com/aptly-dev/aptly $GOPATH /src/github.com/aptly-dev/aptly
RUN cd $GOPATH /src/github.com/aptly-dev/aptly && \
2018-12-21 05:26:31 -06:00
# pin aptly to a specific commit after 1.3.0 that contains gpg2 support
git reset --hard a64807efdaf5e380bfa878c71bc88eae10d62be1 && \
make install
2021-01-28 04:03:18 -06:00
FROM debian:testing-20210111-slim
2018-10-30 09:56:52 -05:00
2021-01-28 04:03:18 -06:00
# Use ARG so as not to persist environment variable in image
ARG DEBIAN_FRONTEND = noninteractive \
GOOGLE_SDK_VERSION = 325.0.0 \
GOOGLE_SDK_CHECKSUM = 374f960c9f384f88b6fc190b268ceac5dcad777301390107af63782bfb5ecbc7
2018-12-21 05:26:31 -06:00
2022-07-20 05:34:09 -05:00
# Install python 3.7, as 3.10 is not working (see https://stackoverflow.com/questions/69779995/solving-an-attribute-error-found-while-installing-or-building-on-google-cloud-pl)
RUN apt update && apt install -y build-essential libsqlite3-dev zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev curl libbz2-dev && \
curl -O https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz && \
tar -xf Python-3.7.3.tar.xz && \
cd Python-3.7.3 && \
./configure --enable-optimizations && \
make -j 8 && \
make altinstall && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.7 get-pip.py
ENV CLOUDSDK_PYTHON = /usr/local/bin/python3.7
2021-02-09 06:18:01 -06:00
# Need procps for pkill utility, which is used by the build pipeline tool to restart the GPG agent
2022-07-20 05:34:09 -05:00
RUN apt update && apt install -yq git procps && pip3 install -U awscli crcmod && \
2020-09-08 08:06:32 -05:00
curl -fLO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${ GOOGLE_SDK_VERSION } -linux-x86_64.tar.gz && \
echo " ${ GOOGLE_SDK_CHECKSUM } google-cloud-sdk- ${ GOOGLE_SDK_VERSION } -linux-x86_64.tar.gz " | sha256sum --check --status && \
tar xzf google-cloud-sdk-${ GOOGLE_SDK_VERSION } -linux-x86_64.tar.gz -C /opt && \
rm google-cloud-sdk-${ GOOGLE_SDK_VERSION } -linux-x86_64.tar.gz && \
2018-12-21 05:26:31 -06:00
apt update && \
2021-01-28 04:03:18 -06:00
apt install -y createrepo-c expect && \
2018-12-21 05:26:31 -06:00
apt-get autoremove -y && \
2019-01-17 04:56:19 -06:00
rm -rf /var/lib/apt/lists/* && \
ln -s /opt/google-cloud-sdk/bin/gsutil /usr/bin/gsutil && \
2019-04-03 08:24:34 -05:00
ln -s /opt/google-cloud-sdk/bin/gcloud /usr/bin/gcloud && \
mkdir -p /deb-repo /rpm-repo && \
2022-07-20 05:34:09 -05:00
ln -s /usr/bin/createrepo_c /usr/bin/createrepo && \
gcloud components update
2018-12-21 05:26:31 -06:00
2021-01-28 04:03:18 -06:00
COPY --from= 0 /go/bin/aptly /usr/local/bin/aptly