intel / Edge-Software-Provisioner

BSD 3-Clause "New" or "Revised" License
42 stars 31 forks source link

adding DOCKER_BUILD_ARGS and DOCKER_RUN_ARGS #24

Closed zhajianl closed 2 years ago

ionutnechita-intel commented 2 years ago

I think is fine with this:

docker run -t --rm --privileged ${DOCKER_RUN_ARGS} ${DOCKER_BUILD_ARGS} --name ${container_name} --env DOCKER_RUN_ARGS='${DOCKER_RUN_ARGS//\'/}' --env DOCKER_BUILD_ARGS='${DOCKER_BUILD_ARGS//\'/}' --entrypoint= -v /var/run:/var/run -v /tmp:/tmp -v $(pwd)/data/persist:/opt/persist ${BASE_BIND} -v ${WEB_PROFILE}/${profile_name}:${WEB_PROFILE}/${profile_name} -v ${WEB_FILES}/${profile_name}:${WEB_FILES}/${profile_name} docker:19.03.12 sh -c 'apk add bash rsync git coreutils; ${WEB_PROFILE}/${profile_name}/build.sh ${WEB_PROFILE}/${profile_name} ${WEB_FILES}/${profile_name}'; \

brod-intel commented 2 years ago

Good catch! We'll merge it.

zhajianl commented 2 years ago

@brod-intel @sunausti @ionutnechita-intel Please help review my new change. Docker run command only need ${DOCKER_RUN_ARGS} parameters and don't need ${DOCKER_BUILD_ARGS}. we use ${DOCKER_RUN_ARGS} to transfer proxy env to the docker container.

ionutnechita-intel commented 2 years ago

This is tested and working correctly.

Thanks.

A good day.