Add dockerfile to produce docker image and drone.yml
continuous-integration/drone Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Cassowary 2023-04-27 13:16:05 -07:00
parent eb3efcc450
commit 51b2ea7f29
2 changed files with 31 additions and 0 deletions

14
.drone.yml Normal file
View File

@ -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

17
Dockerfile Normal file
View File

@ -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"]