Adds a Dockerfile under the docker to package the corso binary. This currently requires the user to build the corso binary (for linux/amd64) in the build image prior to building the docker image. Follow up PRs will introduce a Makefile. Also moves the build image to the build folder and adds a couple of README.md files with instructions. Fixes #218
19 lines
402 B
Bash
Executable File
19 lines
402 B
Bash
Executable File
#! /bin/bash
|
|
|
|
# Builds a docker image that wraps the corso binary
|
|
|
|
IMAGE_NAME="alcionai/corso"
|
|
VERSION=$(git describe --tags --always --dirty)
|
|
CORSO_BINARY="./bin/corso"
|
|
|
|
if [ ! -f "$CORSO_BINARY" ]; then
|
|
echo "$CORSO_BINARY does not exist. Build corso and ensure the binary is available at $CORSO_BINARY"
|
|
exit 1
|
|
fi
|
|
|
|
buildImage() {
|
|
docker build . \
|
|
-t "$IMAGE_NAME:$VERSION"
|
|
}
|
|
|
|
buildImage |