diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 00000000..f47dee13 --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,6 @@ +- id: optimize-files + name: Optimize Images and Zips + description: Losslessly optimize newly-added GZIP, ZIP, JPEG, and PNG files + entry: /app/ect + language: docker + files: '.*\.(png|jpe?g|zip|gz)$' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..65dd6c38 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM alpine:3.18 as base +WORKDIR /app +RUN apk add --no-cache libgcc libstdc++ + +FROM base as build +RUN apk add --no-cache cmake g++ make nasm +COPY . . +RUN cmake -B build src +RUN make -C build -j + +FROM base as runtime +COPY --from=build /app/build/ect . +CMD ["/app/ect"]