mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
build: Fix rpath to refer to absolute location
We originally set the rpath to be relative to the $ORIGIN which apparently changes if the working directory is overriden. This change just fixes the rpath to contain /usr/lib/opa and then updates the Dockerfile to copy the libwasmer.so file into this new directory. Fixes #2974 Signed-off-by: Torin Sandall <torinsandall@gmail.com>
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ USER ${USER}
|
||||
|
||||
ARG BIN_DIR=.
|
||||
COPY ${BIN_DIR}/opa_docker_amd64 /opa
|
||||
COPY ./vendor/github.com/wasmerio/go-ext-wasm/wasmer/libwasmer.so /libwasmer.so
|
||||
COPY ./vendor/github.com/wasmerio/go-ext-wasm/wasmer/libwasmer.so /usr/lib/opa/libwasmer.so
|
||||
|
||||
ENTRYPOINT ["/opa"]
|
||||
CMD ["run"]
|
||||
|
||||
@@ -244,7 +244,7 @@ ci-wasm: wasm-test
|
||||
|
||||
.PHONY: build-docker
|
||||
build-docker: ensure-release-dir
|
||||
CGO_LDFLAGS="-Wl,-rpath -Wl,./$$ORIGIN" $(GO) build $(GO_TAGS) -o $(RELEASE_DIR)/opa_docker_$(GOARCH) -ldflags $(LDFLAGS)
|
||||
CGO_LDFLAGS="-Wl,-rpath,/usr/lib/opa" $(GO) build $(GO_TAGS) -o $(RELEASE_DIR)/opa_docker_$(GOARCH) -ldflags $(LDFLAGS)
|
||||
|
||||
.PHONY: build-linux
|
||||
build-linux: ensure-release-dir
|
||||
|
||||
Reference in New Issue
Block a user