Skip to content

Commit

Permalink
Include CA cert bundle in the image
Browse files Browse the repository at this point in the history
Busybox base image doesn't have one
  • Loading branch information
rojer committed Nov 22, 2015
1 parent 3fcaf82 commit 6eaa12a
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 48 deletions.
1 change: 1 addition & 0 deletions auth_server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ca-certificates.crt
auth_server
Godeps/
1 change: 1 addition & 0 deletions auth_server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ FROM busybox
EXPOSE 5001
ENTRYPOINT ["/auth_server"]
CMD ["/config/auth_config.yml"]
COPY ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY auth_server .
7 changes: 6 additions & 1 deletion auth_server/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
MAKEFLAGS += --warn-undefined-variables
IMAGE ?= cesanta/docker_auth
COMPRESS_BINARY ?= false
CA_BUNDLE = /etc/ssl/certs/ca-certificates.crt

BUILDER_IMAGE ?= centurylink/golang-builder
BUILDER_IMAGE_EXTRA-build-cross = -cross
BUILDER_OPTS-docker-build = -v /var/run/docker.sock:/var/run/docker.sock
BUILDER_IMAGE_EXTRA-docker-build =

.PHONY: %

Expand All @@ -21,7 +23,10 @@ build-local: update-deps
go generate ./...
go build

build build-cross docker-build: update-deps godep
ca-certificates.crt:
cp $(CA_BUNDLE) .

build build-cross docker-build: update-deps godep ca-certificates.crt
docker run --rm -v $(PWD):/src -e COMPRESS_BINARY=$(COMPRESS_BINARY) $(BUILDER_OPTS-$@) $(BUILDER_IMAGE)$(BUILDER_IMAGE_EXTRA-$@) $(IMAGE)

docker-tag-%:
Expand Down
93 changes: 46 additions & 47 deletions auth_server/authn/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6eaa12a

Please sign in to comment.