forked from openshift/assisted-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
skipper-mac.yaml
36 lines (33 loc) · 1.65 KB
/
skipper-mac.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
registry: quay.io
build-container-image: assisted-service-build
# The host network is unsupported for "Docker for desktop" (which is used in macOS) but it partially works.
# For example: creating a new Nginx container with the "host" network using the command "docker run --net host nginx"
# doesn't open the 80 port on the host and you won't be able to access the service on the host using localhost:80.
# From the container, it's possible to access the host ports,
# For example create an nginx container using the command: "docker run -p 80:80 nginx"
# Now create a new container using the command: "docker run -it --net host centos curl http://localhost:80/"
# The centos container can access the Nginx page although it is published to the host.
# The unit-test makefile target starts a new Postgres container and publishes its port to the host.
# There is three options to access the Postgres DB:
# 1. Create a new container on the "host" network and access it at localhost:5432
# 2. Create a new container and access it at host.docker.internal:5432
# 3. Access the container directly container:5432
# We choose the first option since using the other options required a lot of changes
build-container-net: host
containers:
assisted-service-build: Dockerfile.assisted-service-build
volumes:
# config
- $HOME/.minikube:$HOME/.minikube
- $HOME/.docker/:$HOME/.docker
- $CONTAINER_KUBE_CONFIG:$CONTAINER_KUBE_CONFIG
# cache
- $HOME/.cache/go-build:/go/pkg/mod
- $HOME/.cache/golangci-lint:$HOME/.cache/golangci-lint
env_file:
- skipper.env
env:
GOCACHE: "/go/pkg/mod"
SKIPPER_PLATFORM: "darwin"
DOCKER_CONFIG: $DOCKER_CONFIG
KUBECONFIG: $CONTAINER_KUBE_CONFIG