Skip to content

Commit 27d9438

Browse files
authored
Merge pull request #143 from misterjoshua/master
GNU Makefile so that all images can be built by typing, for example, make ruby/2.3.1
2 parents 271a205 + 5d1286d commit 27d9438

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
BUILDS=$(shell egrep -o 'ubuntu/[^ ]*' buildspec.yml | sed 's|^ubuntu/||')
2+
NAME=$(shell dirname $@)
3+
VERSION=$(shell basename $@)
4+
TAG=aws/codebuild/$(NAME):$(VERSION)
5+
6+
all: $(BUILDS)
7+
8+
$(BUILDS):
9+
cd ubuntu/$(NAME)/$(VERSION) && \
10+
docker build -t $(TAG) .

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Steps to build Ruby 2.3.1 image
1414
* Run `cd ubuntu/ruby/2.3.1` to change the directory in your local workspace. This is the location of the Ruby 2.3.1 Dockerfile with Ubuntu 14.04 base.
1515
* Run `docker build -t aws/codebuild/ruby:2.3.1 .` to build Docker image locally
1616

17+
Alternatively, you may use GNU make to build the above image:
18+
19+
* Run `make ruby/2.3.1`. This will build the Docker image locally, as above, from a computer with GNU make.
20+
1721
To poke around in the image interactively, build it and run:
1822
`docker run -it --entrypoint sh aws/codebuild/ruby:2.3.1 -c bash`
1923

0 commit comments

Comments
 (0)