Skip to content

Instantly share code, notes, and snippets.

@focusaurus focusaurus/
Created Jan 26, 2017

What would you like to do?
Build script detects macOS and runs itself under docker
#!/usr/bin/env bash
cd "$(dirname "$0")/.."
if [[ "$(uname)" == "Darwin" ]]; then
docker build --tag foo-rpmbuild .
docker run --interactive --tty --rm \
--volume "${PWD}:/opt/docker-host" \
--volume "$(yarn cache dir | grep '^/'):/var/run/yarn-cache" \
foo-rpmbuild /opt/docker-host/bin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.