Solved this by removing the copy of .env from the docker side and setting the relevant .env variables through the Jenkins set up file.