Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions build/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ RUN cd /src/wire-server/services/${service} && make install
FROM wire-server-deps:alpine

ARG service
COPY --from=builder /src/wire-server/services/${service}/dist/${service} /usr/local/bin/${service}
ARG executable
COPY --from=builder /src/wire-server/services/${service}/dist/${executable} /usr/bin/${exectuable}

# ARGs are not available at runtime, create symlink at build time
# more info: https://stackoverflow.com/questions/40902445/using-variable-interpolation-in-string-in-docker
RUN ln -s /usr/local/bin/${service} /usr/local/bin/service
ENTRYPOINT ["/usr/local/bin/service"]
RUN ln -s /usr/bin/${executable} /usr/bin/service
ENTRYPOINT ["/usr/bin/service"]
10 changes: 9 additions & 1 deletion services/brig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ DEB_IT := dist/$(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
DEB_SCHEMA := dist/$(NAME)-schema_$(VERSION)+$(BUILD)_amd64.deb
DEB_INDEX := dist/$(NAME)-index_$(VERSION)+$(BUILD)_amd64.deb
KEIRETSU_ENV ?= ../.env
EXECUTABLES := $(NAME) $(NAME)-integration $(NAME)-schema $(NAME)-index

guard-%:
@ if [ "${${*}}" = "" ]; then \
Expand Down Expand Up @@ -115,4 +116,11 @@ index-reset: install

.PHONY: docker
docker:
docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
$(foreach executable,$(EXECUTABLES),\
docker build -t $(executable) \
-f ../../build/alpine/Dockerfile \
--build-arg service=$(NAME) \
--build-arg executable=$(executable) \
../.. \
;)

9 changes: 8 additions & 1 deletion services/cannon/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BUILD_NUMBER ?= 0
BUILD_LABEL ?= local
BUILD := $(BUILD_NUMBER)$(shell [ "${BUILD_LABEL}" == "" ] && echo "" || echo ".${BUILD_LABEL}")
DEB := $(NAME)_$(VERSION)+$(BUILD)_amd64.deb
EXECUTABLES := $(NAME)

guard-%:
@ if [ "${${*}}" = "" ]; then \
Expand Down Expand Up @@ -59,4 +60,10 @@ integration-%:

.PHONY: docker
docker:
docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
$(foreach executable,$(EXECUTABLES),\
docker build -t $(executable) \
-f ../../build/alpine/Dockerfile \
--build-arg service=$(NAME) \
--build-arg executable=$(executable) \
../.. \
;)
9 changes: 8 additions & 1 deletion services/cargohold/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ DEB := dist/$(NAME)_$(VERSION)+$(BUILD)_amd64.deb
DEB_IT := dist/$(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
SDIST := dist/$(NAME)-$(VERSION).tar.gz
KEIRETSU_ENV ?= ../.env
EXECUTABLES := $(NAME) $(NAME)-integration

guard-%:
@ if [ "${${*}}" = "" ]; then \
Expand Down Expand Up @@ -66,4 +67,10 @@ integration: install

.PHONY: docker
docker:
docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
$(foreach executable,$(EXECUTABLES),\
docker build -t $(executable) \
-f ../../build/alpine/Dockerfile \
--build-arg service=$(NAME) \
--build-arg executable=$(executable) \
../.. \
;)
10 changes: 9 additions & 1 deletion services/galley/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ DEB_IT := $(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
DEB_SCHEMA := $(NAME)-schema_$(VERSION)+$(BUILD)_amd64.deb
DEB_JOURNALER := $(NAME)-journaler_$(VERSION)+$(BUILD)_amd64.deb
KEIRETSU_ENV ?= ../.env
EXECUTABLES := $(NAME) $(NAME)-integration $(NAME)-schema $(NAME)-journaler

guard-%:
@ if [ "${${*}}" = "" ]; then \
Expand Down Expand Up @@ -101,4 +102,11 @@ db-migrate: install

.PHONY: docker
docker:
docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
$(foreach executable,$(EXECUTABLES),\
docker build -t $(executable) \
-f ../../build/alpine/Dockerfile \
--build-arg service=$(NAME) \
--build-arg executable=$(executable) \
../.. \
;)

10 changes: 9 additions & 1 deletion services/gundeck/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ DEB_IT := $(NAME)-integration_$(VERSION)+$(BUILD)_amd64.deb
DEB_SCHEMA := $(NAME)-schema_$(VERSION)+$(BUILD)_amd64.deb
SDIST := dist/$(NAME)-$(VERSION).tar.gz
KEIRETSU_ENV ?= ../.env
EXECUTABLES := $(NAME) $(NAME)-integration $(NAME)-schema

guard-%:
@ if [ "${${*}}" = "" ]; then \
Expand Down Expand Up @@ -106,4 +107,11 @@ db-migrate: install

.PHONY: docker
docker:
docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
$(foreach executable,$(EXECUTABLES),\
docker build -t $(executable) \
-f ../../build/alpine/Dockerfile \
--build-arg service=$(NAME) \
--build-arg executable=$(executable) \
../.. \
;)

9 changes: 8 additions & 1 deletion services/proxy/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ BUILD_NUMBER ?= 0
BUILD_LABEL ?= local
BUILD := $(BUILD_NUMBER)$(shell [ "${BUILD_LABEL}" == "" ] && echo "" || echo ".${BUILD_LABEL}")
DEB := $(NAME)_$(VERSION)+$(BUILD)_amd64.deb
EXECUTABLES := proxy

guard-%:
@ if [ "${${*}}" = "" ]; then \
Expand Down Expand Up @@ -49,4 +50,10 @@ $(DEB):

.PHONY: docker
docker:
docker build -t $(NAME) -f ../../build/alpine/Dockerfile --build-arg service=$(NAME) ../..
$(foreach executable,$(EXECUTABLES),\
docker build -t $(executable) \
-f ../../build/alpine/Dockerfile \
--build-arg service=$(NAME) \
--build-arg executable=$(executable) \
../.. \
;)