mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-06-15 11:28:47 -04:00
Always including the parent directory into the build context was a bad idea. This reverts the change and only add the opencloud tree to the build context by default. To build a docker image with workspaces enabled as new make target "dev-docker-with-workspace" is introduced that adjust the docker build call accordingly (by setting the right build context and the new SRCDIR arg to point to the correct directory for the opencloud tree).
41 lines
1.5 KiB
Makefile
41 lines
1.5 KiB
Makefile
SHELL := bash
|
|
NAME := opencloud
|
|
TAGS := disable_crypt
|
|
GOARCH := $(shell go env GOARCH)
|
|
CONFIG_DOCS_BASE_PATH := ../docs
|
|
ifdef ENABLE_VIPS
|
|
TAGS := ${TAGS},enable_vips
|
|
endif
|
|
|
|
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
|
|
include ../.bingo/Variables.mk
|
|
endif
|
|
include ../.make/default.mk
|
|
include ../.make/go.mk
|
|
include ../.make/release.mk
|
|
include ../.make/docs.mk
|
|
|
|
.PHONY: dev-docker
|
|
dev-docker:
|
|
docker build -f docker/Dockerfile.multiarch -t opencloudeu/opencloud:dev ..
|
|
|
|
dev-docker-with-workspace:
|
|
docker build -f docker/Dockerfile.multiarch -t opencloudeu/opencloud:dev --build-arg SRCDIR=opencloud ../..
|
|
|
|
.PHONY: dev-docker-multiarch
|
|
dev-docker-multiarch:
|
|
@echo "+-------------------------------------------------------------------------+"
|
|
@echo "| Are you sure you have run make node-generate-prod in the repository root? |"
|
|
@echo "+-------------------------------------------------------------------------+"
|
|
sleep 10
|
|
docker buildx rm opencloudbuilder || true
|
|
docker buildx create --platform linux/arm64,linux/amd64 --name opencloudbuilder
|
|
docker buildx use opencloudbuilder
|
|
docker buildx build --platform linux/arm64,linux/amd64 --output type=docker --file docker/Dockerfile.multiarch --tag opencloudeu/opencloud:dev-multiarch ..
|
|
docker buildx rm opencloudbuilder
|
|
|
|
.PHONY: debug-docker
|
|
debug-docker:
|
|
$(MAKE) --no-print-directory debug-linux-docker-$(GOARCH)
|
|
docker build -f docker/Dockerfile.linux.debug.$(GOARCH) -t opencloudeu/opencloud:debug .
|