We're hiring. We ask candidates to write some code before we talk to them. Which means we have to run other people's code on our laptops. Natural incentives should discourage a job hunter from attacking a potential employer. But I don't trust incentives. So I've taken to running their code in docker. You can too.
cd ~/Downloads/candidates-code docker pull openjdk:8-alpine docker run \ -v "$PWD:/usr/src/app" \ -w /usr/src/app \ -p 8080:8080 \ -it openjdk:8-alpine sh docker pull maven:3.6-jdk-8-alpine docker run \ -v "$PWD:/usr/src/app" \ -w /usr/src/app \ -p 8080:8080 \ -it maven:3.6-jdk-8-alpine sh
In this example our candidate submitted their code in Java. Their `README` indicated java 8+ as a requirement... so I pulled that version of image. I run the container mounting the local directory and opening a port which was also mentioned in the `README`.
Their code came with tests, so I also used a maven container to be able to run those tests.
docker pull node:10.9-alpine docker run \ -v "$PWD:/home/node" \ -w /home/node \ -p 3000:3000 \ -it node:10.9-alpine sh