From 51b2ea7f2918c099ee35613e3a2ae9dd4900661b Mon Sep 17 00:00:00 2001 From: Cassowary Rusnov Date: Thu, 27 Apr 2023 13:16:05 -0700 Subject: [PATCH] Add dockerfile to produce docker image and drone.yml --- .drone.yml | 14 ++++++++++++++ Dockerfile | 17 +++++++++++++++++ 2 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..a3b9c60 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,14 @@ +--- +kind: pipeline +name: publish docker image +steps: + - name: build and publish + image: plugins/docker + settings: + auto_tag: true + username: 3wordchant + password: + from_secret: git_coopcloud_tech_token_3wc + repo: git.coopcloud.tech/coop-cloud-chaos-patchs/thttpd + tags: latest + registry: git.coopcloud.tech diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b645fa8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1 + +FROM alpine:latest AS build +RUN mkdir /tmp/source/ +WORKDIR /tmp/source/ +COPY ./ /tmp/source/ +RUN apk --no-cache add build-base && ./configure && make + + +FROM alpine:latest +COPY --from=build /tmp/source/thttpd /usr/sbin/thttpd +COPY --from=build /tmp/source/extras/htpasswd /usr/sbin/htpasswd +RUN apk --no-cache add ca-certificates +WORKDIR /var/www/http +EXPOSE 80 +ENTRYPOINT ["/usr/sbin/thttpd"] +CMD ["-D" "-l" "/dev/stderr" "-d" "/var/www/http"]