featurebase/runners/Dockerfile
CLoZengineer dc27e3d1d8
feat: builds docker images for running featurebase from a release (#2193)
* adds dockerfile for building images to run examples on

* adds makefile entries to build and push docker runner images

* cleans up tar artifacts when building ingest runner

* moves executables to /usr/local/bin

* moves the sources for building runner images into their own folder

* simplifies makefile and adds directions to readme
2022-11-08 13:07:17 -05:00

31 lines
826 B
Docker

ARG FEATUREBASE_URL=https://github.com/FeatureBaseDB/featurebase/releases/download/v1.1.0-community/featurebase-v1.1.0-community-linux-amd64.tar.gz
# builder is responsible for downloads and conforming to naming conventions
FROM alpine:latest as builder
ARG FEATUREBASE_URL
RUN wget -O featurebase.tar.gz ${FEATUREBASE_URL}
RUN tar -zxvf featurebase.tar.gz
RUN mv featurebase-v*/ featurebase/
RUN mv idk-v*/ idk/
###
# runner for featurebase binary
FROM alpine:latest as featurebase
COPY --from=builder /featurebase /usr/local/bin
WORKDIR /home/featurebase
###
# runner for IDK
FROM alpine:latest as ingest
COPY --from=builder /idk /idk
WORKDIR idk
# Alpine tar command seems to leave meta files behind, this removes them
RUN rm \._*
RUN chmod ug+x *
RUN mv /idk/* /usr/local/bin
RUN rm -rf /idk
WORKDIR /home/ingester