From 3d90fec2a29b9056f7055c22c49f67530a99dbb4 Mon Sep 17 00:00:00 2001 From: Emelie Graven Date: Wed, 24 Nov 2021 10:39:08 +0100 Subject: [PATCH] Add Dockerfile and drone config Adds a Dockerfile that builds the project, and a drone pipeline to push the docker image to the docker hub. --- .drone.yml | 12 ++++++++++++ Dockerfile | 15 +++++++++++++++ README.md | 4 ++++ 3 files changed, 31 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..08d377c --- /dev/null +++ b/.drone.yml @@ -0,0 +1,12 @@ +kind: pipeline +name: default + +steps: +- name: docker + image: plugins/docker + settings: + repo: egraven/tidy-html5 + auto_tag: true + username: egraven + password: + from_secret: DOCKER_TOKEN diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7e374b9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM debian:stable-slim AS builder +RUN apt-get update -y && \ + apt-get install -y git cmake make build-essential gcc + +WORKDIR /build +COPY . . + +RUN cd build/cmake +RUN cmake /app -DCMAKE_BUILD_TYPE=Release +RUN make +RUN make install + +FROM debian:stable-slim AS runtime +COPY --from=builder /usr/local/bin/tidy /usr/local/bin/tidy +ENTRYPOINT [ "/usr/local/bin/tidy" ] diff --git a/README.md b/README.md index 2dd08c0..0aa54a7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +[![Build Status](https://drone.data.coop/api/badges/emelie/tidy-html5/status.svg?ref=refs/heads/next)](https://drone.data.coop/emelie/tidy-html5) + +## Forked from [https://github.com/htacg/tidy-html5](https://github.com/htacg/tidy-html5) + # HTACG HTML Tidy All other READMEs and related materials can be found in [README/][100]. Although all of our materials should be linked in this README, be sure to check this directory for documents we’ve not yet added to this document.