opencb / cellbase

High-Performance NoSQL database and RESTful web services to access to most relevant biological data
Apache License 2.0
89 stars 53 forks source link

Create a shell script to build and push Docker images on DockerHub #491

Open julie-sullivan opened 4 years ago

julie-sullivan commented 4 years ago

Create a script in cellbase-app to be shortcuts to publishing docker images on docker hub.

# build both docker images
if build
  ./cellbase-base/ docker build ../../build
  ./cellbase-rest/ docker build ../../build
# publish both images to docker hub
if push
  build
  docker login -u -p
  docker push cellbase-rest
  docker push cellbase-base

I am leaving out cellbase-build because this is only for the deployment.

julie-sullivan commented 4 years ago

https://github.com/opencb/cellbase/commit/e24244d92f8c94dda07519579a31947dce3026f5

imedina commented 4 years ago

This script must be run from CellBase directory after building (build directory). The usage:

docker-build.sh {build|push} [tag] [build_folder]

where:

With this script, we can easily build and push Docker images manually or from a CI/CD pipeline.