# tinqs/ci docker — Docker builds (platform image, bot image)
# Used by: build (platform), deploy-bot
# runs-on: docker
# Based on docker:dind for Docker-in-Docker support.

FROM docker:29-dind

RUN apk add --no-cache \
    bash git curl wget unzip tar \
    ca-certificates openssh-client \
    build-base s6 tzdata

# AWS CLI
RUN curl -fsSL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o /tmp/awscli.zip && \
    unzip -q /tmp/awscli.zip -d /tmp && \
    /tmp/aws/install && \
    rm -rf /tmp/awscli.zip /tmp/aws

# Go (needed for platform Docker builds that compile inside container)
ARG GO_VERSION=1.26.2
RUN curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" | tar -C /usr/local -xz
ENV PATH="/usr/local/go/bin:/go/bin:${PATH}"
ENV GOPATH="/go"

RUN docker --version && aws --version && go version

WORKDIR /workspace
