Please note that I haven't checked if / how this might interfere with the 
CI setup and thus might require changes in that if it breaks compatibility.

Τη Παρασκευή, 17 Απριλίου 2020 - 7:09:29 μ.μ. UTC+3, ο χρήστης Fotis 
Xenakis έγραψε:
>
> Signed-off-by: Fotis Xenakis <[email protected]> 
> --- 
>  docker/Dockerfile.builder             | 10 +++++----- 
>  docker/Dockerfile.builder-fedora-base | 20 ++++++++++---------- 
>  docker/Dockerfile.builder-ubuntu-base | 20 ++++++++++---------- 
>  docker/Dockerfile.runner-fedora       |  2 +- 
>  docker/Dockerfile.runner-ubuntu       |  6 +++--- 
>  docker/README.md                      |  9 +++++---- 
>  6 files changed, 34 insertions(+), 33 deletions(-) 
>
> diff --git a/docker/Dockerfile.builder b/docker/Dockerfile.builder 
> index d8561ca9..b53cdf2b 100644 
> --- a/docker/Dockerfile.builder 
> +++ b/docker/Dockerfile.builder 
> @@ -8,7 +8,7 @@ 
>  # This Docker file defines a container intended to build, test and 
> publish 
>  # OSv kernel as well as many applications ... 
>  # 
> -ARG DIST="fedora-29" 
> +ARG DIST="fedora-31" 
>  FROM osvunikernel/osv-${DIST}-builder-base 
>   
>  # 
> @@ -33,8 +33,8 @@ CMD /bin/bash 
>  # 
>  # NOTES 
>  # 
> -# Build the container based on default Fedora 29 base image: 
> -# docker build -t osv/builder-fedora-29 -f Dockerfile.builder . 
> +# Build the container based on default Fedora 31 base image: 
> +# docker build -t osv/builder-fedora-31 -f Dockerfile.builder . 
>  # 
>  # Build the container based of specific Ubuntu version 
>  # docker build -t osv/builder-ubuntu-19.10 -f Dockerfile.builder 
> --build-arg DIST="ubuntu-19.10" . 
> @@ -43,8 +43,8 @@ CMD /bin/bash 
>  # docker build -t osv/builder-fedora-31 -f Dockerfile.builder --build-arg 
> DIST="fedora-31" --build-arg GIT_ORG_OR_USER=a_user . 
>  # 
>  # Run the container FIRST time example: 
> -# docker run -it --privileged osv/builder-fedora-29 
> -# 
> +# docker run -it --privileged osv/builder-fedora-31 
> +# 
>  # To restart: 
>  # docker restart ID (from docker ps -a) && docker attach ID 
>  # 
> diff --git a/docker/Dockerfile.builder-fedora-base 
> b/docker/Dockerfile.builder-fedora-base 
> index bb537047..5f1f80fe 100644 
> --- a/docker/Dockerfile.builder-fedora-base 
> +++ b/docker/Dockerfile.builder-fedora-base 
> @@ -7,7 +7,7 @@ 
>  # This Docker file defines an image based on Ubuntu distribution and 
> provides 
>  # all packages necessary to build and run kernel and applications. 
>  # 
> -ARG DIST_VERSION=29 
> +ARG DIST_VERSION=31 
>  FROM fedora:${DIST_VERSION} 
>   
>  RUN yum install -y git python3 file which 
> @@ -17,20 +17,20 @@ RUN yum install -y git python3 file which 
>  # 
>   
>  # - prepare directories 
> -RUN mkdir /git-repos 
> +RUN mkdir -p /osv/scripts 
>   
> -# - clone OSv just to get setup.py 
> -WORKDIR /git-repos 
> +# - get setup.py 
>  ARG GIT_ORG_OR_USER=cloudius-systems 
> -RUN git clone --depth 1 -b master --single-branch 
> https://github.com/${GIT_ORG_OR_USER}/osv.git 
>
> -WORKDIR <https://github.com/$%7BGIT_ORG_OR_USER%7D/osv.git-WORKDIR> 
> /git-repos/osv 
> +ARG GIT_BRANCH=master 
> +ADD 
> https://raw.githubusercontent.com/${GIT_ORG_OR_USER}/osv/${GIT_BRANCH}/scripts/linux_distro.py
>  
> /osv/scripts/ 
> +ADD 
> https://raw.githubusercontent.com/${GIT_ORG_OR_USER}/osv/${GIT_BRANCH}/scripts/setup.py
>  
> /osv/scripts/ 
>   
> -# - install all required packages and remove OSv git repo 
> -RUN scripts/setup.py 
> -RUN rm -rf /git-repos 
> +# - install all required packages and remove scripts 
> +RUN python3 /osv/scripts/setup.py && rm -rf /osv/scripts 
>   
>  # - install Capstan 
> -RUN wget 
> https://github.com/cloudius-systems/capstan/releases/latest/download/capstan 
> -O /usr/local/bin/capstan 
> +ADD 
> https://github.com/cloudius-systems/capstan/releases/latest/download/capstan 
> /usr/local/bin/capstan 
>  RUN chmod u+x /usr/local/bin/capstan 
>   
> +WORKDIR /osv 
>  CMD /bin/bash 
> diff --git a/docker/Dockerfile.builder-ubuntu-base 
> b/docker/Dockerfile.builder-ubuntu-base 
> index 9c9bf551..293ba3d0 100644 
> --- a/docker/Dockerfile.builder-ubuntu-base 
> +++ b/docker/Dockerfile.builder-ubuntu-base 
> @@ -7,7 +7,7 @@ 
>  # This Docker file defines an image based on Ubuntu distribution and 
> provides 
>  # all packages necessary to build and run kernel and applications. 
>  # 
> -ARG DIST_VERSION=19.04 
> +ARG DIST_VERSION=19.10 
>  FROM ubuntu:${DIST_VERSION} 
>   
>  ENV DEBIAN_FRONTEND noninteractive 
> @@ -23,22 +23,22 @@ RUN apt-get update -y && apt-get install -y git 
> python3 
>  # 
>   
>  # - prepare directories 
> -RUN mkdir /git-repos 
> +RUN mkdir -p /osv/scripts 
>   
> -# - clone OSv 
> -WORKDIR /git-repos 
> +# - get setup.py 
>  ARG GIT_ORG_OR_USER=cloudius-systems 
> -RUN git clone --depth 1 -b master --single-branch 
> https://github.com/${GIT_ORG_OR_USER}/osv.git 
>
> -WORKDIR <https://github.com/$%7BGIT_ORG_OR_USER%7D/osv.git-WORKDIR> 
> /git-repos/osv 
> +ARG GIT_BRANCH=master 
> +ADD 
> https://raw.githubusercontent.com/${GIT_ORG_OR_USER}/osv/${GIT_BRANCH}/scripts/linux_distro.py
>  
> /osv/scripts/ 
> +ADD 
> https://raw.githubusercontent.com/${GIT_ORG_OR_USER}/osv/${GIT_BRANCH}/scripts/setup.py
>  
> /osv/scripts/ 
>   
> -# - install all required packages and delete OSv repo 
> -RUN scripts/setup.py 
> -RUN rm -rf /git-repos 
> +# - install all required packages and remove scripts 
> +RUN python3 /osv/scripts/setup.py && rm -rf /osv/scripts 
>   
>  RUN update-alternatives --set java 
> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 
>   
>  # - install Capstan 
> -RUN wget 
> https://github.com/cloudius-systems/capstan/releases/latest/download/capstan 
> -O /usr/local/bin/capstan 
> +ADD 
> https://github.com/cloudius-systems/capstan/releases/latest/download/capstan 
> /usr/local/bin/ 
>  RUN chmod u+x /usr/local/bin/capstan 
>   
> +WORKDIR /osv 
>  CMD /bin/bash 
> diff --git a/docker/Dockerfile.runner-fedora 
> b/docker/Dockerfile.runner-fedora 
> index bebcb8d4..f0eb3689 100644 
> --- a/docker/Dockerfile.runner-fedora 
> +++ b/docker/Dockerfile.runner-fedora 
> @@ -8,7 +8,7 @@ 
>  # This Docker file defines a container intended to run and test OSv 
>  # It comes with capstan that can pull kernel and pre-built MPM packages 
>  # 
> -ARG DIST_VERSION=29 
> +ARG DIST_VERSION=31 
>  FROM fedora:${DIST_VERSION} 
>   
>  RUN yum install -y \ 
> diff --git a/docker/Dockerfile.runner-ubuntu 
> b/docker/Dockerfile.runner-ubuntu 
> index 247612a2..6edc83df 100644 
> --- a/docker/Dockerfile.runner-ubuntu 
> +++ b/docker/Dockerfile.runner-ubuntu 
> @@ -8,7 +8,7 @@ 
>  # This Docker file defines a container intended to run and test OSv 
>  # It comes with capstan that can pull kernel and pre-built MPM packages 
>  # 
> -ARG DIST_VERSION=19.04 
> +ARG DIST_VERSION=19.10 
>  FROM ubuntu:${DIST_VERSION} 
>   
>  ENV DEBIAN_FRONTEND noninteractive 
> @@ -26,7 +26,7 @@ qemu-system-x86 \ 
>  qemu-utils 
>   
>  # - prepare directories 
> -RUN mkdir /git-repos /result 
> +RUN mkdir /git-repos 
>   
>  # - clone OSv 
>  WORKDIR /git-repos 
> @@ -51,7 +51,7 @@ CMD /bin/bash 
>  # 
>  # Run the container FIRST time example: 
>  # docker run -it --privileged osv/runner-ubuntu 
> -# 
> +# 
>  # To restart: 
>  # docker restart ID (from docker ps -a) && docker attach ID 
>  # 
> diff --git a/docker/README.md b/docker/README.md 
> index 9fee9f17..1761da45 100644 
> --- a/docker/README.md 
> +++ b/docker/README.md 
> @@ -2,14 +2,14 @@ 
>  Docker files intended to help setup OSv build environment. 
>  There are two versions of it - one based on Ubuntu and another on Fedora. 
>   
> -Build container image 
> +Build container image (default, based on Fedora) 
>  ``` 
> -docker build -t osv/builder-ubuntu -f Dockerfile.builder-ubuntu . # Use 
> specific docker file 
> +docker build -t osv/builder -f Dockerfile.builder . 
>  ``` 
>   
>  Build container image for specific version of linux distribution and git 
> repo owner (if forker) 
>  ``` 
> -docker build -t osv/builder-fedora-31 -f Dockerfile.builder-fedora 
> --build-arg DIST_VERSION=31 --build-arg GIT_ORG_OR_USER=a_user . 
> +docker build -t osv/builder-ubuntu-19.10 -f Dockerfile.builder 
> --build-arg DIST="ubuntu-19.10" --build-arg GIT_ORG_OR_USER=a_user . 
>  ``` 
>   
>  Run container 
> @@ -41,8 +41,9 @@ git pull 
>   
>  To update Fedora/Ubuntu packages run this in /git-repos/osv directory: 
>  ```bash 
> -./script/setup.py 
> +./scripts/setup.py 
>  ``` 
> + 
>  # Docker OSv runner 
>  Docker files intended to help setup OSv environment to run and test OSv. 
>  There are two versions of it - one based on Ubuntu and another on Fedora. 
> -- 
> 2.26.1 
>
>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/244fa87d-ec2c-4df4-9fc5-5871524c18eb%40googlegroups.com.

Reply via email to