Sign inSign up

hienanh/boost-env

By hienanh

•Updated over 3 years ago

Image
0

417

hienanh/boost-env repository overview

⁠Install docker-buildx

mkdir -p ~/.docker/cli-plugins
cd ~/.docker/cli-plugins
  • Download binary file with corresponding CPU's architecture in this link⁠ to directory ~/.docker/cli-plugins.

  • Rename binary file to docker-buildx.

  • Check install successfull or not: docker buildx

  • Examples:

wget https://github.com/docker/buildx/releases/download/v0.9.0-rc2/buildx-v0.9.0-rc2.linux-amd64 -O ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx

wget https://github.com/docker/buildx/releases/download/v0.9.0-rc2/buildx-v0.9.0-rc2.linux-arm64 -O ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx

wget https://github.com/docker/buildx/releases/download/v0.9.0-rc2/buildx-v0.9.0-rc2.linux-arm-v7 -O ~/.docker/cli-plugins/docker-buildx
chmod +x ~/.docker/cli-plugins/docker-buildx

⁠Build Images

docker buildx build --platform linux/amd64 --no-cache -t hienanh/boost-env:v2.0-amd64 --push . -f Dockerfile
docker buildx build --platform linux/arm64 --no-cache -t hienanh/boost-env:v2.0-arm64 --push . -f Dockerfile
docker buildx build --platform linux/arm/v7 --no-cache -t hienanh/boost-env:v2.0-armv7 --push . -f Dockerfile
docker pull hienanh/boost-env:v2.0-amd64
docker pull hienanh/boost-env:v2.0-arm64
docker pull hienanh/boost-env:v2.0-armv7
docker manifest create hienanh/boost-env:v2.0 \
    --amend hienanh/boost-env:v2.0-amd64 \
    --amend hienanh/boost-env:v2.0-arm64 \
    --amend hienanh/boost-env:v2.0-armv7 
docker manifest push hienanh/boost-env:v2.0

⁠Run

docker run -it --rm -d --name boost -v $(pwd):/root/boost hienanh/boost-env:v2.0

⁠Dockerfile

Click to expand
# Install necessary library
FROM ubuntu:focal
ENV DEBIAN_FRONTEND noninteractive

# Install necessary library
RUN apt update && \
    apt upgrade -y && \
    apt install --assume-yes software-properties-common git cmake g++ zlib* wget libssl1* libssl-dev -y

# Install boost
# RUN wget https://boostorg.jfrog.io/artifactory/main/release/1.77.0/source/boost_1_77_0.tar.gz -O /root/boost_1_77_0.tar.gz && \
RUN cd /root && \
    wget --no-check-certificate https://udomain.dl.sourceforge.net/project/boost/boost/1.77.0/boost_1_77_0.tar.gz -O /root/boost_1_77_0.tar.gz && \
    apt install --assume-yes build-essential autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev && \
    tar -xvzf boost_1_77_0.tar.gz && \
    cd /root/boost_1_77_0 && \
    ./bootstrap.sh --prefix=/usr/ --with-libraries=python && \
    ./b2 --with=all -j$(nproc) install && \
    cd /root && rm -rf boost_*

Tag summary

Content type

Image

Digest

Size

655.3 MB

Last updated

over 4 years ago

docker pull hienanh/boost-env