diff mbox

[v2,03/15] docker: Add images

Message ID 1455626399-7111-4-git-send-email-famz@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fam Zheng Feb. 16, 2016, 12:39 p.m. UTC
Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/docker/dockerfiles/centos6.docker | 5 +++++
 tests/docker/dockerfiles/fedora.docker  | 7 +++++++
 tests/docker/dockerfiles/ubuntu.docker  | 9 +++++++++
 3 files changed, 21 insertions(+)
 create mode 100644 tests/docker/dockerfiles/centos6.docker
 create mode 100644 tests/docker/dockerfiles/fedora.docker
 create mode 100644 tests/docker/dockerfiles/ubuntu.docker

Comments

Alex Bennée Feb. 29, 2016, 5:18 p.m. UTC | #1
Fam Zheng <famz@redhat.com> writes:

> Signed-off-by: Fam Zheng <famz@redhat.com>

I think we need to include the dtc libs in here unless we need to ship
all submodules in the tree as well.

Is there a way to get a plain install shell? PAUSE=1 on the test shells
doesn't seem to allow me to install anything.

> ---
>  tests/docker/dockerfiles/centos6.docker | 5 +++++
>  tests/docker/dockerfiles/fedora.docker  | 7 +++++++
>  tests/docker/dockerfiles/ubuntu.docker  | 9 +++++++++
>  3 files changed, 21 insertions(+)
>  create mode 100644 tests/docker/dockerfiles/centos6.docker
>  create mode 100644 tests/docker/dockerfiles/fedora.docker
>  create mode 100644 tests/docker/dockerfiles/ubuntu.docker
>
> diff --git a/tests/docker/dockerfiles/centos6.docker b/tests/docker/dockerfiles/centos6.docker
> new file mode 100644
> index 0000000..7daa2fb
> --- /dev/null
> +++ b/tests/docker/dockerfiles/centos6.docker
> @@ -0,0 +1,5 @@
> +FROM centos:6
> +RUN yum install -y \
> +    git make gcc g++ \
> +    zlib-devel glib2-devel SDL-devel pixman-devel
> +
> diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
> new file mode 100644
> index 0000000..81091b7
> --- /dev/null
> +++ b/tests/docker/dockerfiles/fedora.docker
> @@ -0,0 +1,7 @@
> +FROM fedora:23
> +RUN dnf install -y \
> +    ccache git \
> +    glib2-devel pixman-devel zlib-devel SDL-devel \
> +    gcc gcc-c++ clang make perl which bc findutils \
> +    mingw{32,64}-{pixman,glib2,gmp,SDL,pkg-config,gtk2,gtk3,gnutls,nettle,libtasn1,libjpeg-turbo,libpng,curl,libssh2,bzip2}
> +ENV FEATURES mingw clang
> diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
> new file mode 100644
> index 0000000..f1dc518
> --- /dev/null
> +++ b/tests/docker/dockerfiles/ubuntu.docker
> @@ -0,0 +1,9 @@
> +FROM ubuntu:14.04
> +RUN apt-get update
> +RUN apt-get -y install \
> +    libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev \
> +    libseccomp-dev libgnutls-dev libssh2-1-dev  libspice-server-dev \
> +    libspice-protocol-dev libnss3-dev \
> +    libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev \
> +    git make ccache python-yaml gcc clang
> +ENV FEATURES clang ccache pyyaml


--
Alex Bennée
Fam Zheng March 1, 2016, 1:19 a.m. UTC | #2
On Mon, 02/29 17:18, Alex Bennée wrote:
> 
> Fam Zheng <famz@redhat.com> writes:
> 
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> 
> I think we need to include the dtc libs in here unless we need to ship
> all submodules in the tree as well.

OK, will take a look.

> 
> Is there a way to get a plain install shell? PAUSE=1 on the test shells
> doesn't seem to allow me to install anything.

What is the error when you install things? I think it is an unmodified shell
and "yum" or "apt-get" should just work. It's just that when the container
exits the changes will be discarded.

Fam
Alex Bennée March 1, 2016, 9:52 a.m. UTC | #3
Fam Zheng <famz@redhat.com> writes:

> On Mon, 02/29 17:18, Alex Bennée wrote:
>>
>> Fam Zheng <famz@redhat.com> writes:
>>
>> > Signed-off-by: Fam Zheng <famz@redhat.com>
>>
>> I think we need to include the dtc libs in here unless we need to ship
>> all submodules in the tree as well.
>
> OK, will take a look.
>
>>
>> Is there a way to get a plain install shell? PAUSE=1 on the test shells
>> doesn't seem to allow me to install anything.
>
> What is the error when you install things? I think it is an unmodified shell
> and "yum" or "apt-get" should just work. It's just that when the container
> exits the changes will be discarded.

So running:

make docker-test-quick@ubuntu PAUSE=1

And I got a shell I wanted to try and get working:

root@72d09615d5b2:/var/tmp/qemu.tmp# ./configure

ERROR: DTC (libfdt) version >= 1.4.0 not present. Your options:
(1) Preferred: Install the DTC (libfdt) devel package
(2) Fetch the DTC submodule, using:
git submodule update --init dtc

root@72d09615d5b2:/var/tmp/qemu.tmp# apt-cache search libfdt
libfdt-dev - Flat Device Trees manipulation library - development
files
libfdt1 - Flat Device Trees manipulation library
root@72d09615d5b2:/var/tmp/qemu.tmp# apt-get install libfdt-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libfdt1
The following NEW packages will be installed:
libfdt-dev libfdt1
0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
Need to get 37.8 kB of archives.
After this operation, 216 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Err http://archive.ubuntu.com/ubuntu/ trusty/main libfdt1 amd64
1.4.0+dfsg-1
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com/ubuntu/ trusty/main libfdt-dev amd64
1.4.0+dfsg-1
Could not resolve 'archive.ubuntu.com'
E: Failed to fetch
http://archive.ubuntu.com/ubuntu/pool/main/d/device-tree-compiler/libfdt1_1.4.0+dfsg-1_amd64.deb
Could not resolve 'archive.ubuntu.com'

E: Failed to fetch
http://archive.ubuntu.com/ubuntu/pool/main/d/device-tree-compiler/libfdt-dev_1.4.0+dfsg-1_amd64.deb
Could not resolve 'archive.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?
root@72d09615d5b2:/var/tmp/qemu.tmp# apt-get update
Err http://archive.ubuntu.com trusty InRelease

Err http://archive.ubuntu.com trusty-updates InRelease

Err http://archive.ubuntu.com trusty-security InRelease

Err http://archive.ubuntu.com trusty Release.gpg
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com trusty-updates Release.gpg
Could not resolve 'archive.ubuntu.com'
Err http://archive.ubuntu.com trusty-security Release.gpg
Could not resolve 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not
resolve 'archive.ubuntu.com'

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg
Could not resolve 'archive.ubuntu.com'

W: Failed to fetch
http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg
Could not resolve 'archive.ubuntu.com'

W: Some index files failed to download. They have been ignored, or old
ones used instead.


So it looks like networking isn't working in the test images. For
debugging problems I think we need to be able to install stuff on a
running image so we can then fix the base recipes.

>
> Fam


--
Alex Bennée
Fam Zheng March 2, 2016, 2:23 a.m. UTC | #4
On Tue, 03/01 09:52, Alex Bennée wrote:
> 
> Fam Zheng <famz@redhat.com> writes:
> 
> > On Mon, 02/29 17:18, Alex Bennée wrote:
> >>
> >> Fam Zheng <famz@redhat.com> writes:
> >>
> >> > Signed-off-by: Fam Zheng <famz@redhat.com>
> >>
> >> I think we need to include the dtc libs in here unless we need to ship
> >> all submodules in the tree as well.
> >
> > OK, will take a look.
> >
> >>
> >> Is there a way to get a plain install shell? PAUSE=1 on the test shells
> >> doesn't seem to allow me to install anything.
> >
> > What is the error when you install things? I think it is an unmodified shell
> > and "yum" or "apt-get" should just work. It's just that when the container
> > exits the changes will be discarded.
> 
> So running:
> 
> make docker-test-quick@ubuntu PAUSE=1
> 
> And I got a shell I wanted to try and get working:
> 
> root@72d09615d5b2:/var/tmp/qemu.tmp# ./configure
> 
> ERROR: DTC (libfdt) version >= 1.4.0 not present. Your options:
> (1) Preferred: Install the DTC (libfdt) devel package
> (2) Fetch the DTC submodule, using:
> git submodule update --init dtc
> 
> root@72d09615d5b2:/var/tmp/qemu.tmp# apt-cache search libfdt
> libfdt-dev - Flat Device Trees manipulation library - development
> files
> libfdt1 - Flat Device Trees manipulation library
> root@72d09615d5b2:/var/tmp/qemu.tmp# apt-get install libfdt-dev
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following extra packages will be installed:
> libfdt1
> The following NEW packages will be installed:
> libfdt-dev libfdt1
> 0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
> Need to get 37.8 kB of archives.
> After this operation, 216 kB of additional disk space will be used.
> Do you want to continue? [Y/n]
> Err http://archive.ubuntu.com/ubuntu/ trusty/main libfdt1 amd64
> 1.4.0+dfsg-1
> Could not resolve 'archive.ubuntu.com'
> Err http://archive.ubuntu.com/ubuntu/ trusty/main libfdt-dev amd64
> 1.4.0+dfsg-1
> Could not resolve 'archive.ubuntu.com'
> E: Failed to fetch
> http://archive.ubuntu.com/ubuntu/pool/main/d/device-tree-compiler/libfdt1_1.4.0+dfsg-1_amd64.deb
> Could not resolve 'archive.ubuntu.com'
> 
> E: Failed to fetch
> http://archive.ubuntu.com/ubuntu/pool/main/d/device-tree-compiler/libfdt-dev_1.4.0+dfsg-1_amd64.deb
> Could not resolve 'archive.ubuntu.com'
> 
> E: Unable to fetch some archives, maybe run apt-get update or try with
> --fix-missing?
> root@72d09615d5b2:/var/tmp/qemu.tmp# apt-get update
> Err http://archive.ubuntu.com trusty InRelease
> 
> Err http://archive.ubuntu.com trusty-updates InRelease
> 
> Err http://archive.ubuntu.com trusty-security InRelease
> 
> Err http://archive.ubuntu.com trusty Release.gpg
> Could not resolve 'archive.ubuntu.com'
> Err http://archive.ubuntu.com trusty-updates Release.gpg
> Could not resolve 'archive.ubuntu.com'
> Err http://archive.ubuntu.com trusty-security Release.gpg
> Could not resolve 'archive.ubuntu.com'
> Reading package lists... Done
> W: Failed to fetch
> http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
> 
> W: Failed to fetch
> http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
> 
> W: Failed to fetch
> http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease
> 
> W: Failed to fetch
> http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not
> resolve 'archive.ubuntu.com'
> 
> W: Failed to fetch
> http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg
> Could not resolve 'archive.ubuntu.com'
> 
> W: Failed to fetch
> http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg
> Could not resolve 'archive.ubuntu.com'
> 
> W: Some index files failed to download. They have been ignored, or old
> ones used instead.
> 
> 
> So it looks like networking isn't working in the test images. For
> debugging problems I think we need to be able to install stuff on a
> running image so we can then fix the base recipes.

Oh yes, I added "-net=none" to the "docker run" command for better isolation.
So in this case we should enable it. Let's rename PAUSE=1 to DEBUG=1 and
enable network.

Fam
Alex Bennée March 2, 2016, 7:26 a.m. UTC | #5
Fam Zheng <famz@redhat.com> writes:

> On Tue, 03/01 09:52, Alex Bennée wrote:
>>
>> Fam Zheng <famz@redhat.com> writes:
>>
>> > On Mon, 02/29 17:18, Alex Bennée wrote:
>> >>
>> >> Fam Zheng <famz@redhat.com> writes:
>> >>
>> >> > Signed-off-by: Fam Zheng <famz@redhat.com>
>> >>
>> >> I think we need to include the dtc libs in here unless we need to ship
>> >> all submodules in the tree as well.
>> >
>> > OK, will take a look.
>> >
>> >>
>> >> Is there a way to get a plain install shell? PAUSE=1 on the test shells
>> >> doesn't seem to allow me to install anything.
>> >
>> > What is the error when you install things? I think it is an unmodified shell
>> > and "yum" or "apt-get" should just work. It's just that when the container
>> > exits the changes will be discarded.
>>
>> So running:
>>
>> make docker-test-quick@ubuntu PAUSE=1
>>
>> And I got a shell I wanted to try and get working:
>>
>> root@72d09615d5b2:/var/tmp/qemu.tmp# ./configure
>>
>> ERROR: DTC (libfdt) version >= 1.4.0 not present. Your options:
>> (1) Preferred: Install the DTC (libfdt) devel package
>> (2) Fetch the DTC submodule, using:
>> git submodule update --init dtc
>>
>> root@72d09615d5b2:/var/tmp/qemu.tmp# apt-cache search libfdt
>> libfdt-dev - Flat Device Trees manipulation library - development
>> files
>> libfdt1 - Flat Device Trees manipulation library
>> root@72d09615d5b2:/var/tmp/qemu.tmp# apt-get install libfdt-dev
>> Reading package lists... Done
>> Building dependency tree
>> Reading state information... Done
>> The following extra packages will be installed:
>> libfdt1
>> The following NEW packages will be installed:
>> libfdt-dev libfdt1
>> 0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
>> Need to get 37.8 kB of archives.
>> After this operation, 216 kB of additional disk space will be used.
>> Do you want to continue? [Y/n]
>> Err http://archive.ubuntu.com/ubuntu/ trusty/main libfdt1 amd64
>> 1.4.0+dfsg-1
>> Could not resolve 'archive.ubuntu.com'
>> Err http://archive.ubuntu.com/ubuntu/ trusty/main libfdt-dev amd64
>> 1.4.0+dfsg-1
>> Could not resolve 'archive.ubuntu.com'
>> E: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/pool/main/d/device-tree-compiler/libfdt1_1.4.0+dfsg-1_amd64.deb
>> Could not resolve 'archive.ubuntu.com'
>>
>> E: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/pool/main/d/device-tree-compiler/libfdt-dev_1.4.0+dfsg-1_amd64.deb
>> Could not resolve 'archive.ubuntu.com'
>>
>> E: Unable to fetch some archives, maybe run apt-get update or try with
>> --fix-missing?
>> root@72d09615d5b2:/var/tmp/qemu.tmp# apt-get update
>> Err http://archive.ubuntu.com trusty InRelease
>>
>> Err http://archive.ubuntu.com trusty-updates InRelease
>>
>> Err http://archive.ubuntu.com trusty-security InRelease
>>
>> Err http://archive.ubuntu.com trusty Release.gpg
>> Could not resolve 'archive.ubuntu.com'
>> Err http://archive.ubuntu.com trusty-updates Release.gpg
>> Could not resolve 'archive.ubuntu.com'
>> Err http://archive.ubuntu.com trusty-security Release.gpg
>> Could not resolve 'archive.ubuntu.com'
>> Reading package lists... Done
>> W: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
>>
>> W: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/dists/trusty-updates/InRelease
>>
>> W: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/dists/trusty-security/InRelease
>>
>> W: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/dists/trusty/Release.gpg  Could not
>> resolve 'archive.ubuntu.com'
>>
>> W: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/dists/trusty-updates/Release.gpg
>> Could not resolve 'archive.ubuntu.com'
>>
>> W: Failed to fetch
>> http://archive.ubuntu.com/ubuntu/dists/trusty-security/Release.gpg
>> Could not resolve 'archive.ubuntu.com'
>>
>> W: Some index files failed to download. They have been ignored, or old
>> ones used instead.
>>
>>
>> So it looks like networking isn't working in the test images. For
>> debugging problems I think we need to be able to install stuff on a
>> running image so we can then fix the base recipes.
>
> Oh yes, I added "-net=none" to the "docker run" command for better isolation.
> So in this case we should enable it. Let's rename PAUSE=1 to DEBUG=1 and
> enable network.

Sounds good.

>
> Fam


--
Alex Bennée
diff mbox

Patch

diff --git a/tests/docker/dockerfiles/centos6.docker b/tests/docker/dockerfiles/centos6.docker
new file mode 100644
index 0000000..7daa2fb
--- /dev/null
+++ b/tests/docker/dockerfiles/centos6.docker
@@ -0,0 +1,5 @@ 
+FROM centos:6
+RUN yum install -y \
+    git make gcc g++ \
+    zlib-devel glib2-devel SDL-devel pixman-devel
+
diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker
new file mode 100644
index 0000000..81091b7
--- /dev/null
+++ b/tests/docker/dockerfiles/fedora.docker
@@ -0,0 +1,7 @@ 
+FROM fedora:23
+RUN dnf install -y \
+    ccache git \
+    glib2-devel pixman-devel zlib-devel SDL-devel \
+    gcc gcc-c++ clang make perl which bc findutils \
+    mingw{32,64}-{pixman,glib2,gmp,SDL,pkg-config,gtk2,gtk3,gnutls,nettle,libtasn1,libjpeg-turbo,libpng,curl,libssh2,bzip2}
+ENV FEATURES mingw clang
diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker
new file mode 100644
index 0000000..f1dc518
--- /dev/null
+++ b/tests/docker/dockerfiles/ubuntu.docker
@@ -0,0 +1,9 @@ 
+FROM ubuntu:14.04
+RUN apt-get update
+RUN apt-get -y install \
+    libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev \
+    libseccomp-dev libgnutls-dev libssh2-1-dev  libspice-server-dev \
+    libspice-protocol-dev libnss3-dev \
+    libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev \
+    git make ccache python-yaml gcc clang
+ENV FEATURES clang ccache pyyaml