Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dockerfile to build image which contains fluid-client-python sdk #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions build_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
VERSION=v1.0.0
GIT_SHA=$(git rev-parse --short HEAD || echo "HEAD")
GIT_VERSION=${VERSION}-${GIT_SHA}
IMAGE_REPO=fluidcloudnative
IMAGE_NAME=${IMAGE_REPO}/fluid-client-python

echo "Building image: ${IMAGE_NAME}:${GIT_VERSION}"
docker build --no-cache . -f docker/Dockerfile.fluidclientpython -t ${IMAGE_NAME}:${GIT_VERSION}

while getopts "p" opt
do
case $opt in
p)
echo "Pushing image: ${IMAGE_NAME}:${GIT_VERSION}"
docker push ${IMAGE_NAME}:${GIT_VERSION}
;;
?)
echo "Usage: build_image.sh [OPTION]"
echo " -p Push the built image"
exit 1
;;
esac
done
8 changes: 8 additions & 0 deletions docker/Dockerfile.fluidclientpython
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Build the image which contains the Fluid Client Python SDK
FROM python:3.8

WORKDIR /fluid-client-python

COPY . .
RUN pip install -r requirements.txt
RUN python setup.py install