mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-02 02:02:24 +00:00
obs-packaging: Build and run Dockerfile based on GOARCH
Currently, since GOARCH is not passed as build-arg to a Dockerfile, it by default always pick's up amd64 when building it. Also pass it as --env when running it. Fixes #148 Signed-off-by: Nitesh Konkar niteshkonkar@in.ibm.com
This commit is contained in:
parent
ee6ef0954a
commit
6a755c672e
@ -34,6 +34,7 @@ docker_run() {
|
|||||||
-v "${HOME}/.ssh":/root/.ssh \
|
-v "${HOME}/.ssh":/root/.ssh \
|
||||||
-v "${HOME}/.gitconfig":/root/.gitconfig \
|
-v "${HOME}/.gitconfig":/root/.gitconfig \
|
||||||
-v /etc/profile:/etc/profile \
|
-v /etc/profile:/etc/profile \
|
||||||
|
--env GO_ARCH="${GO_ARCH}" \
|
||||||
--env http_proxy="${http_proxy}" \
|
--env http_proxy="${http_proxy}" \
|
||||||
--env https_proxy="${https_proxy}" \
|
--env https_proxy="${https_proxy}" \
|
||||||
--env no_proxy="${no_proxy}" \
|
--env no_proxy="${no_proxy}" \
|
||||||
@ -71,6 +72,7 @@ main() {
|
|||||||
sudo docker build \
|
sudo docker build \
|
||||||
--build-arg http_proxy="${http_proxy}" \
|
--build-arg http_proxy="${http_proxy}" \
|
||||||
--build-arg https_proxy="${https_proxy}" \
|
--build-arg https_proxy="${https_proxy}" \
|
||||||
|
--build-arg GO_ARCH="${GO_ARCH}" \
|
||||||
-t $obs_image "${script_dir}"
|
-t $obs_image "${script_dir}"
|
||||||
|
|
||||||
#Create/update OBS repository for branch
|
#Create/update OBS repository for branch
|
||||||
|
Loading…
Reference in New Issue
Block a user