Skip to content

Commit

Permalink
added Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Sameer Naik committed Sep 19, 2014
1 parent 531debe commit 96948c0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ LICENSE
VERSION
README.md
Changelog.md
Makefile
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
all: help

help:
@echo ""
@echo "-- Help Menu"
@echo ""
@echo " 1. make build - build the gitlab image"
@echo " 2. make start - start gitlab"
@echo " 3. make stop - stop gitlab"
@echo " 4. make logs - view logs"
@echo " 5. make purge - stop and remove the container"

build:
@docker build --tag=${USER}/gitlab .

start:
@echo "Starting gitlab..."
@docker run --name='gitlab-demo' -d \
-p 10022:22 -p 10080:80 \
-e 'GITLAB_PORT=10080' -e 'GITLAB_SSH_PORT=10022' \
${USER}/gitlab:latest >/dev/null
@echo "GitLab instance is booting up..."
@echo "Please be patient. This could take a while..."
@echo "GitLab will be available at http://localhost:10080"
@echo "Type 'make logs' for the logs"

stop:
@echo "Stopping gitlab..."
@docker stop gitlab-demo >/dev/null

purge: stop
@echo "Removing stopped container..."
@docker rm gitlab-demo >/dev/null

logs:
@docker logs -f gitlab-demo

0 comments on commit 96948c0

Please sign in to comment.