diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..af29fbda --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM python:3 + +RUN apt update -y + +LABEL Name=pythonplantsvszombies Version=0.0.1 + +RUN pip install pygame + +WORKDIR /app/ + +RUN echo "Working Directory: /app/ " + + +RUN echo "Cloning the Marblexu's Repository" + +RUN git clone https://github.com/marblexu/PythonPlantsVsZombies /app/ + +RUN echo "Almost done" + +CMD python main.py >> /dev/null + +RUN echo "Enjoy Playing!!!" diff --git a/run-docker.sh b/run-docker.sh new file mode 100644 index 00000000..022e0aa8 --- /dev/null +++ b/run-docker.sh @@ -0,0 +1,21 @@ +#bin/bash + +RED='\033[0;31m' + +GREEN='\033[0;32m' + +NC='\033[0m' + +echo -e "${GREEN}Plants VS Zombies${NC}" + +echo -e "${RED}Creating a container instance for the game...${NC}" + +xhost + + +docker build -t sanmargparanjpe/plantsvszombie . + +echo "${RED}Starting the instance...${NC}" + +docker run -it --env="DISPLAY" --net=host sanmargparanjpe/plantsvszombie + +echo "${RED}Quiting the Game${NC}" \ No newline at end of file