Skip to content

Instantly share code, notes, and snippets.

@dduan

dduan/drstring.sh

Created Oct 15, 2019
Embed
What would you like to do?
Run DrString anywhere docker is available!
#!/bin/bash
temp_file=$(mktemp)
echo 'FROM swift@sha256:c4d53af406c5dc48bd43c0d313f3ed80924eee4bf78907ce4ad6eb8f5513f376' >> temp_file
echo 'RUN git clone https://github.com/dduan/DrString.git; cd DrString; make build; cp .build/release/drstring /bin/drstring' >> temp_file
echo 'RUN rm -rf /data' >> temp_file
echo 'ADD . /data' >> temp_file
echo 'WORKDIR /data' >> temp_file
echo 'ENTRYPOINT ["drstring"]' >> temp_file
IMAGE=drstring-execute
docker build -t $IMAGE -f temp_file . &> /dev/null
docker --log-level fatal run --rm $IMAGE "$@"
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.