Skip to content

Commit

Permalink
chore: refactor docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
moul committed Oct 15, 2018
1 parent 49a2140 commit 4319101
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
lint:
<<: *golang_workspace
docker:
- image: bertychat/linter:latest
- image: bertychat/linter:v2
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
client.rn.android:
working_directory: ~/go/src/berty.tech/client/react-native/mobile/android
docker:
- image: bertychat/android-ci:latest
- image: bertychat/android-ci:v2
steps:
- checkout:
path: ~/go/src/berty.tech/
Expand Down
15 changes: 0 additions & 15 deletions .circleci/docker/Makefile

This file was deleted.

File renamed without changes.
7 changes: 7 additions & 0 deletions build/docker/android-ci/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
IMAGE ?= bertychat/android-ci:v2

build:
docker build --pull -t $(IMAGE) .

release: build
docker push $(IMAGE)
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions build/docker/linter/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
IMAGE ?= bertychat/linter:v2

build:
docker build --pull -t $(IMAGE) .

release: build
docker push $(IMAGE)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM moul/protoc-gen-gotemplate as pgg
FROM moul/protoc-gen-gotemplate:latest as pgg

FROM golang:1.11-alpine as builder

RUN apk --update add make git go rsync libc-dev openssh docker
RUN apk --no-cache add make git go rsync libc-dev openssh docker

RUN go get -u -v \
github.com/gogo/protobuf/proto \
Expand All @@ -20,7 +20,7 @@ RUN cd /go/src/github.com/99designs/gqlgen && git checkout v0.6.0 && go inst
RUN rm -f /go/bin/web-editor

FROM golang:1.11-alpine
RUN apk --update add git make protobuf gcc libc-dev && mkdir -p /.cache/go-build && chmod -R 777 /.cache
RUN apk --no-cache add git make protobuf gcc libc-dev && mkdir -p /.cache/go-build && chmod -R 777 /.cache
COPY --from=pgg /go/bin/* /go/bin/
COPY --from=builder /go/bin/* /go/bin/
COPY --from=pgg /protobuf /protobuf
Expand Down
7 changes: 7 additions & 0 deletions build/docker/protoc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
IMAGE ?= bertychat/protoc:v3

build:
docker build --pull -t $(IMAGE) .

release: build
docker push $(IMAGE)
2 changes: 1 addition & 1 deletion client/react-native/gomobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PWD := $(shell pwd)
CORE_PACKAGE := $(PWD)/../../../core
CORE_SOURCES := $(shell find $(CORE_PACKAGE) -type f -name "*.go") \
$(shell find . -type f -name "*.go")
BUILD_PATCH_PATH := $(PWD)/../../../.circleci/docker
BUILD_PATCH_PATH := $(PWD)/../../../build/docker/android-ci

GOPATH ?= $(HOME)/go

Expand Down

0 comments on commit 4319101

Please sign in to comment.