FROM alpine AS build-env

RUN apk update && apk add git g++
RUN git clone https://github.com/fanux/tetris.git
RUN g++ -static tetris/src/*cpp -o game -pthread -g
RUN strip game

FROM busybox

COPY --from=build-env /game /

CMD /game
