Skip to content

Instantly share code, notes, and snippets.

@prologic
Created November 22, 2014 01:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save prologic/369dc8c1b172d04b4fad to your computer and use it in GitHub Desktop.
created by github.com/tr3buchet/gister
#!/bin/bash
# Tool to test CRUX Port(s) by building
# the port inside a CRUX Docker Container.
port=$(basename $(pwd))
cat - > Dockerfile <<EOF
FROM crux/base:latest
RUN ports -u && prt-get cache
COPY . /usr/ports/contrib/${port}/
ENTRYPOINT ["/usr/bin/prt-get"]
CMD ["depinst", "${port}"]
EOF
docker rm -f $(docker ps -a -q -f 'name=${port}')
docker build -t ${port} .
docker run -i -t -v $(pwd):/usr/ports/contrib/${port} --name ${port} ${port}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment