forked from wolfSSL/wolfssl
Update buildAndPush.sh and README.md
This commit is contained in:
@ -3,6 +3,9 @@ This is a Docker environment for compiling, testing and running WolfSSL. Use `ru
|
||||
|
||||
When the compilation and tests succeed, you will be dropped in to a shell environment within the container. This can be useful to build other things within the environment. Additional tests can be run as well as debugging of code.
|
||||
|
||||
# Docker Hub
|
||||
These images are also uploaded to the wolfSSL's [Docker Hub page](https://hub.docker.com/orgs/wolfssl/repositories). There is a convenience script here `buildAndPush.sh` that will create the appropriate containers and push them to the repo.
|
||||
|
||||
# FAQ
|
||||
## permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock
|
||||
You need to be added to the `docker` group to run Docker containers. Run `sudo usermod -aG docker $USER`. You may need to restart the Docker daemon.
|
||||
|
@ -5,13 +5,33 @@ if [ "${DOCKER_BASE_IMAGE}" != "" ]; then
|
||||
DOCKER_BUILD_OPTIONS+=" --build-arg DOCKER_BASE_IMAGE=${DOCKER_BASE_IMAGE}"
|
||||
fi
|
||||
|
||||
NUM_FAILURES=0
|
||||
|
||||
CUR_DATE=$(date -u +%F)
|
||||
echo "Building wolfssl/wolfssl-builder:${CUR_DATE} as ${DOCKER_BUILD_OPTIONS}"
|
||||
docker build -t wolfssl/wolfssl-builder:${CUR_DATE} ${DOCKER_BUILD_OPTIONS} "${WOLFSSL_DIR}/Docker" && \
|
||||
docker push wolfssl/wolfssl-builder:${CUR_DATE} && \
|
||||
docker tag wolfssl/wolfssl-builder:${CUR_DATE} wolfssl/wolfssl-builder:latest && \
|
||||
docker push wolfssl/wolfssl-builder:latest && \
|
||||
docker build --build-arg DOCKER_BASE_IMAGE=wolfssl/wolfssl-builder:${CUR_DATE} -t wolfssl/testing-cross-compiler:${CUR_DATE} "${WOLFSSL_DIR}/Docker" -f Dockerfile.cross-compiler && \
|
||||
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && \
|
||||
docker tag wolfssl/testing-cross-compiler:${CUR_DATE} wolfssl/testing-cross-compiler:latest && \
|
||||
docker push wolfssl/testing-cross-compiler:latest
|
||||
docker tag wolfssl/testing-cross-compiler:${CUR_DATE} wolfssl/testing-cross-compiler:latest
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Pushing containers to DockerHub"
|
||||
docker push wolfssl/wolfssl-builder:${CUR_DATE} && docker push wolfssl/wolfssl-builder:latest && \
|
||||
docker push wolfssl/testing-cross-compiler:${CUR_DATE} && docker push wolfssl/testing-cross-compiler:latest
|
||||
else
|
||||
echo "Warning: Build wolfssl/wolfssl-builder failed. Continuing"
|
||||
((NUM_FAILURES++))
|
||||
fi
|
||||
|
||||
echo "Building wolfssl/wolfCLU:${CUR_DATE}"
|
||||
docker build --pull --build-arg DUMMY=${CUR_DATE} -t wolfssl/wolfclu:${CUR_DATE} "${WOLFSSL_DIR}/Docker/wolfCLU" && \
|
||||
docker tag wolfssl/wolfclu:${CUR_DATE} wolfssl/wolfclu:latest
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Pushing containers to DockerHub"
|
||||
docker push wolfssl/wolfclu:${CUR_DATE} && docker push wolfssl/wolfclu:latest
|
||||
else
|
||||
echo "Warning: Build wolfssl/wolfclu failed. Continuing"
|
||||
((NUM_FAILURES++))
|
||||
fi
|
||||
|
||||
echo "Script completed in $SECONDS seconds. Had $NUM_FAILURES failures."
|
||||
|
Reference in New Issue
Block a user