From 318c213573ccc1e85e48a60002e694716388be64 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Fri, 23 Mar 2018 20:26:46 -0600 Subject: Move docker from build dir to docker --- Makefile | 6 +++--- build/Dockerfile | 31 ------------------------------- build/entry.sh | 3 --- docker/Dockerfile | 31 +++++++++++++++++++++++++++++++ docker/entry.sh | 3 +++ docker/requirements.txt | 4 ++++ 6 files changed, 41 insertions(+), 37 deletions(-) delete mode 100644 build/Dockerfile delete mode 100644 build/entry.sh create mode 100644 docker/Dockerfile create mode 100644 docker/entry.sh create mode 100644 docker/requirements.txt diff --git a/Makefile b/Makefile index 97e4d39..fabe763 100644 --- a/Makefile +++ b/Makefile @@ -8,9 +8,9 @@ help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' build: ## Build the Docker image - cp -r requirements.txt ./build - cp -r config.json ./build - docker build -t $(IMAGENAME) ./build + cp -r requirements.txt ./docker + cp -r config.json ./docker + docker build -t $(IMAGENAME) ./docker up: build ## Bring the Docker container up docker run -td -v $(PWD):/opt --name $(CONTAINERNAME) $(IMAGENAME) || echo 'Already up!' diff --git a/build/Dockerfile b/build/Dockerfile deleted file mode 100644 index e31cb36..0000000 --- a/build/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -FROM ubuntu:16.04 -MAINTAINER Cody Hiar - -# Needed for better experience in container terminal -ENV TERM=xterm-256color - -# Update and install -RUN apt-get update && apt-get install -y \ - git \ - wget \ - # for cal utility - bsdmainutils \ - # Python - python3-dev \ - python3-pip - -# Add the project requirements -ADD requirements.txt /opt/requirements.txt - -# # Install the requirements, remove 3 for wagtail -RUN /bin/bash -c 'cd /opt \ - && pip3 install -r requirements.txt' - -ADD config.json /opt/config.json - -# change to /opt for the working directory, you should mount the local dir volume here -WORKDIR /opt - -# Add the entry script -ADD entry.sh /opt/ -RUN chmod 755 /opt/entry.sh diff --git a/build/entry.sh b/build/entry.sh deleted file mode 100644 index 09a943f..0000000 --- a/build/entry.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -while true; do echo hi; sleep 1; done; diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..e31cb36 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,31 @@ +FROM ubuntu:16.04 +MAINTAINER Cody Hiar + +# Needed for better experience in container terminal +ENV TERM=xterm-256color + +# Update and install +RUN apt-get update && apt-get install -y \ + git \ + wget \ + # for cal utility + bsdmainutils \ + # Python + python3-dev \ + python3-pip + +# Add the project requirements +ADD requirements.txt /opt/requirements.txt + +# # Install the requirements, remove 3 for wagtail +RUN /bin/bash -c 'cd /opt \ + && pip3 install -r requirements.txt' + +ADD config.json /opt/config.json + +# change to /opt for the working directory, you should mount the local dir volume here +WORKDIR /opt + +# Add the entry script +ADD entry.sh /opt/ +RUN chmod 755 /opt/entry.sh diff --git a/docker/entry.sh b/docker/entry.sh new file mode 100644 index 0000000..09a943f --- /dev/null +++ b/docker/entry.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +while true; do echo hi; sleep 1; done; diff --git a/docker/requirements.txt b/docker/requirements.txt new file mode 100644 index 0000000..be697e7 --- /dev/null +++ b/docker/requirements.txt @@ -0,0 +1,4 @@ +requests==2.18.4 +fuzzyfinder==2.1.0 +prompt-toolkit==1.0.15 +blessings==1.6.1 -- cgit v1.2.3