Skip to content
Closed
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
8 changes: 5 additions & 3 deletions dp/tools/skaffold_hooks/hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@ export MAGMA_ROOT=$(realpath ..)


build_controller() {
export DOCKER_BUILDKIT=1
export COMPOSE_DOCKER_CLI_BUILD=1
cd $MAGMA_ROOT/orc8r/cloud/docker
python3 build.py -b controller
python3 build.py -b controller &&
docker tag orc8r_controller:latest $IMAGE
}

build_nginx() {
cd $MAGMA_ROOT/orc8r/cloud/docker
python3 build.py -b nginx
python3 build.py -b nginx &&
docker tag orc8r_nginx:latest $IMAGE
}

build_magmalte() {
cd $MAGMA_ROOT/nms/packages/magmalte
docker-compose build magmalte
docker-compose build magmalte &&
docker tag magmalte_magmalte:latest $IMAGE
}

Expand Down
4 changes: 3 additions & 1 deletion orc8r/cloud/docker/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# syntax=docker/dockerfile:1.3
# ------------------------------------------------------------------------------
# Base: for tests, precommit, codegen, etc.
# ------------------------------------------------------------------------------
Expand Down Expand Up @@ -74,7 +75,8 @@ COPY configs /etc/magma/configs
# ------------------------------------------------------------------------------
FROM src as builder

RUN . /etc/profile.d/env.sh && make build
RUN --mount=type=cache,target=/root/.cache/go-build \
. /etc/profile.d/env.sh && make build

# ------------------------------------------------------------------------------
# Production
Expand Down