Add initial implementation of two-tone detector with Docker support

This commit is contained in:
2025-08-15 11:30:28 -04:00
commit cd6934049e
3 changed files with 537 additions and 0 deletions

34
Dockerfile Normal file
View File

@ -0,0 +1,34 @@
# builder
FROM golang:alpine AS builder
WORKDIR /app
ADD . /app
RUN CGO_ENABLED=0 go build -o two-tone-detector
# runner
FROM alpine:latest
WORKDIR /app
COPY --from=builder /app/two-tone-detector /app/two-tone-detector
# Metadata params
ARG VERSION
ARG BUILD_DATE
ARG NAME
ARG VENDOR
# Metadata
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.url="https://alex.savin.nyc" \
org.label-schema.docker.schema-version="1.0"
# org.label-schema.name=$NAME \
# org.label-schema.description="Example of multi-stage docker build" \
# org.label-schema.vcs-url=https://github.com/alex-savin/$VCS_URL \
# org.label-schema.vcs-ref=$VCS_REF \
# org.label-schema.vendor=$VENDOR \
# org.label-schema.version=$VERSION \
VOLUME /app/config
CMD ["./two-tone-detector"]