mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
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
This commit is contained in:
parent
daceee2ab6
commit
dc27e3d1d8
3 changed files with 55 additions and 0 deletions
31
runners/Dockerfile
Normal file
31
runners/Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
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
|
||||
14
runners/Makefile
Normal file
14
runners/Makefile
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
.PHONY: build-runners push-runners
|
||||
|
||||
TAG_ROOT=ghcr.io/featurebasedb/examples
|
||||
TAG_FB_RUNNER=$(TAG_ROOT)/featurebase-runner
|
||||
TAG_INGEST_RUNNER=$(TAG_ROOT)/ingest-runner
|
||||
TAG_VERSION=latest
|
||||
|
||||
build-runners:
|
||||
docker build --target=featurebase -t$(TAG_FB_RUNNER):$(TAG_VERSION) -f Dockerfile ../
|
||||
docker build --target=ingest -t$(TAG_INGEST_RUNNER):$(TAG_VERSION) -f Dockerfile ../
|
||||
|
||||
push-runners:
|
||||
docker push $(TAG_FB_RUNNER):$(TAG_VERSION)
|
||||
docker push $(TAG_INGEST_RUNNER):$(TAG_VERSION)
|
||||
10
runners/README.md
Normal file
10
runners/README.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# FeatureBase Runners
|
||||
|
||||
Docker images for running FeatureBase.
|
||||
|
||||
## Build and Push Runners
|
||||
|
||||
`make build-runners`
|
||||
`make push-runners`
|
||||
|
||||
** Requires the user to log into the target docker repository. **
|
||||
Loading…
Add table
Reference in a new issue