Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix resolving of KO_DOCKER_REPO for run-docker #1592

Merged
merged 1 commit into from
Nov 8, 2023
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
5 changes: 3 additions & 2 deletions .mk/develop.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ endif
.PHONY: run-docker
run-docker: run-docker-teardown ## run the app under docker-compose
@echo "Running docker-compose up $(services)..."
@echo "Building the minder-server image..."
@echo "Building the minder-server image (KO_DOCKER_REPO=$(KO_DOCKER_REPO))..."

@# podman (at least) doesn't seem to like multi-arch images, and sometimes picks the wrong one (e.g. amd64 on arm64)
@# We also need to remove the build: directives to use ko builds
@# ko resolve will fill in the image: field in the compose file, but it adds a yaml document separator
@sed -e '/^ *build:/d' -e 's| image: minder:latest| image: ko://github.com/stacklok/minder/cmd/server|' docker-compose.yaml | ko resolve --base-import-paths --platform linux/$(DOCKERARCH) -f - | sed 's/^--*$$//' > .resolved-compose.yaml
@sed -e '/^ *build:/d' -e 's| image: minder:latest| image: ko://github.com/stacklok/minder/cmd/server|' docker-compose.yaml | KO_DOCKER_REPO=$(KO_DOCKER_REPO) ko resolve --base-import-paths --platform linux/$(DOCKERARCH) -f - | sed 's/^--*$$//' > .resolved-compose.yaml
@$(COMPOSE) -f .resolved-compose.yaml up $(COMPOSE_ARGS) $(services)
@rm .resolved-compose.yaml*

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ See the documentation on how to do that - [Docs](https://minder-docs.stacklok.de
Start `minder-server` along with its dependant services (`keycloak` and `postgres`) by running:

```bash
KO_DOCKER_REPO=ko.local make run-docker
make run-docker
```

#### Configure social login (GitHub)
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/developer_guide/get-hacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Note that the application requires a database to be running. This can be achieve
using docker-compose:

```bash
KO_DOCKER_REPO=ko.local services="postgres keycloak migrateup" make run-docker
services="postgres keycloak migrateup" make run-docker
```

Then run the application
Expand Down