LoginSignup
0
0

More than 3 years have passed since last update.

localに特定のdocker imageが存在しないときや、requirements.txtが変更されているときにbuildするshell script

Last updated at Posted at 2020-05-29

コード

#!/bin/bash
if test -z "$(docker images -q my-image:my-version)" -o -n "$(git diff --exit-code requirements.txt)"; then
  docker build -t my-image:my-version -f docker/Dockerfile .
fi
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0