# This is a fogos base image. For a list of available versions see:
#     curl -u <username> https://docker.tttech.com/v2/nervesw/fogos-rpm-build/tags/list
FROM docker.tttech.com/nervesw/fogos-rpm-build:1.2.1-2
ARG SPECFILE
ENV SPECFILE ${SPECFILE}

# NOTE: WORKDIR and USER are inside the docker container - do not change!
WORKDIR /home/build/
USER build:build

# You only need to copy the .git directory, as the build will come from an export
COPY .git/ .git/

CMD git-buildrpm build ${SPECFILE}
