Commit Graph

55 Commits

Author SHA1 Message Date
Sebastiaan van Stijn dca34a0417
Dockerfile: switch to "buster" variant (current stable)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-30 21:59:28 +02:00
Sebastiaan van Stijn 48bf88c40e
Dockerfile: prevent busting build-cache for busybox rootfs
Move adding the source code to the end, so that the busybox rootfs
doesn't have to be fetched again on each code change.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-30 21:59:26 +02:00
Sebastiaan van Stijn a596387689
Dockerfile: sort dependencies, and cleanup apt cache
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-30 21:59:24 +02:00
Sebastiaan van Stijn c4821c2bd8
Dockerfile: set DEBIAN_FRONTEND=noninteractive
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-30 21:59:21 +02:00
Sebastiaan van Stijn 201152a976
Dockerfile: use build-args to allow overriding versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-03-30 21:59:17 +02:00
Mrunal Patel 53ad1d5100
Merge pull request #2256 from kolyshkin/mountinfo-alt
Use faster mountinfo parser (part 1)
2020-03-27 11:36:51 -07:00
Kir Kolyshkin 3147c3200e Switch to golang 1.13, drop unsupported versions
Run CI with go 1.13 and 1.14 (aka "stable").

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-21 10:33:23 -07:00
Kir Kolyshkin 88a0244783 Dockerfile: add -f to curl
When github is giving HTTP 404 (or other error), it still sends some
document (to be viewed in a browser), but we have tar on the other end
of the pipe, so the end result is like this:

> Step 13/13 : RUN . tests/integration/multi-arch.bash     && curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS}
> 4872 ---> Running in ad84646a69f3
> 4873xz: (stdin): File format not recognized
> 4874tar: Child returned status 1
> 4875tar: Error is not recoverable: exiting now
> 4876The command '/bin/sh -c . tests/integration/multi-arch.bash     && curl -o- -sSL `get_busybox` | tar xfJC - ${ROOTFS}' returned a non-zero code: 2

Add -f switch to curl, so it will display an HTTP error and exit:

> curl: (22) The requested URL returned error: 404 Not Found
> xz: (stdin): File format not recognized
> tar: Child returned status 1
> tar: Error is not recoverable: exiting now

While at it, also
 * remove -v from criu untar (too much output)
 * remove -o - from curl (it does the same by default)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2020-03-20 17:26:15 -07:00
Mrunal Patel 0fd4342a92
Merge pull request #2028 from thaJeztah/bump_golang_versions
Update to Go 1.12 and drop obsolete versions
2019-09-05 16:30:01 -07:00
Akihiro Suda 7e67862542 Bump CRIU to 3.12
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-07-08 17:22:57 +09:00
Sebastiaan van Stijn e7831f2abb
Update to Go 1.12 and drop obsolete versions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-04-12 16:27:40 +02:00
Adrian Reber 403986c5dd
Add CRIU patch to fix checkpoint test
For the newly integrated feature to use CRIU configuration files the
test is broken without an additional CRIU patch.

The test changes CRIU's log file. Changing the log file is unfortunately
the only thing which is in broken in CRIU 3.11. But it is the easiest
option for testing. With CRIU 3.12 this will be fixed. All other CRIU
options can be changed with a CRIU configuration file.

With this change the CRIU 3.11 feature can be merged into runc with a
test and for the user it should just work, if they are not trying to
change CRIU's log file.

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-12-21 07:42:12 +01:00
Adrian Reber 3763427777
Bump CRIU to 3.11
Upgrade CRIU to 3.11 in the Dockerfile as it includes the patch which
was manually added to fix an error with read-only root containers.

Now that the patch is part of the CRIU 3.11 release this simplifies the
Dockerfile (minimal).

Signed-off-by: Adrian Reber <areber@redhat.com>
2018-11-19 10:08:09 +01:00
Akihiro Suda e389f5757c Dockerfile: update criu to v3.10 + checkpoint-restore/criu@27034e7c
For criu v3.10, a patch is needed for `@test "checkpoint --lazy-pages and restore"`.
Starting with v3.11, the patch will no longer be needed.

The issue had not been caught in Travis because the kernel is too old and the test
had not been executed in Travis.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-08-12 14:05:44 +09:00
Akihiro Suda 39f679c450 travis: test cross compilation
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-06-16 09:32:39 +09:00
Andrei Vagin 74e961e2e2 tests: allow to load kernel modules from a test container
CRIU needs to load a few modules to checkpoint/resume containers.

https://github.com/opencontainers/runc/issues/1745
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-03-13 01:20:12 +03:00
Daniel Dao 8be31629cf upgrade criu to v3.7
The current version of criu bundled in dockerfile failed to do checkpoint/restore test on my
system (v4.14.14). Upgrade to latest version v3.7 and also change the
repository name to point to the current official repo.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2018-02-26 11:48:39 +00:00
Daniel Dao 121c7b458e upgrade to go 1.10 with debian stretch
This also remove jessie-backport version of libseccomp and just use
stretch bundled version

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2018-02-26 11:48:11 +00:00
Bin Lu 604dbfbe12 enable integration test on arm64 platform
Currently, integration test can't be done on arm64 platform due to several issues.
 Fix points:
 1, add busybox.tar with arm64 format
 2, add hello-world.tar with arm64 format

Signed-off-by: Bin Lu <bin.lu@arm.com>
2017-11-12 22:43:13 -08:00
Jianyong Wu dc609cc5d1 enable unit test on arm64 platform
Currently, unit test can't be done on arm64 platform
due to multi-arch issue.

Fix points:
golang:1.8.0 doesn't support arm64.
We use golang:1.8 to replace it.

Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
2017-11-03 16:45:52 +08:00
Aleksa Sarai eb5bd4fa6a
tests: add tests for rootless multi-mapping configurations
Enable several previously disabled tests (for the idmap execution mode)
for rootless containers, in addition to making all tests use the
additional mappings. At the moment there's no strong need to add any
additional tests purely for rootless_idmap.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-09-09 12:45:33 +10:00
Michael Crosby 5930d5b427 Remove shfmt
We don't have that many scripts and for the amount of errors this is
causing on a weekly basis for contributors its not worth the overhead.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-07-06 11:08:44 -07:00
Daniel Dao f8cca79253
criu: update to commit 3ca8e575b49763030d3ddfec4af190a4c9f9deef
CI has fixed kernel version for stack gap bug, updated to
3ca8e575b4
which seems to fix the failed tests.

Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2017-06-25 16:10:57 +01:00
Michael Crosby 53ab4f8717
Update criu to 3.1
This updates criu to the latest release to help resolve some of the
issues we are seeing on the CI.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-24 15:18:18 +01:00
Andrei Vagin fe03957bca Dockerfile: use CRIU 2.12 for tests
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2017-05-02 04:48:47 +03:00
Aleksa Sarai ba38383a39
tests: add rootless integration tests
This adds targets for rootless integration tests, as well as all of the
required setup in order to get the tests to run. This includes quite a
few changes, because of a lot of assumptions about things running as
root within the bats scripts (which is not true when setting up rootless
containers).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2017-03-23 20:46:22 +11:00
Máximo Cuadros e773f96b0e update go version at travis-ci
Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
2017-02-20 13:15:58 +01:00
Qiang Huang c94bc353ef Bump golang to 1.7.4
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2017-01-12 16:15:39 +08:00
Michal Rostecki 5032f434f3 Clean apt archives and source directories in Dockerfile
Signed-off-by: Michal Rostecki <michal@kinvolk.io>
2016-12-14 23:42:32 +01:00
Aleksa Sarai bda3055055
*: update busybox test rootfs
Switch to the actual source of the official Docker library of images, so
that we have a proper source for the test filesystem. In addition,
update to the latest released version (1.25.0 [2016-06-23]) so that we
can use more up-to-date applets in our tests (such as stat(3)).

This patch is part of the console rewrite patchset.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-01 15:49:36 +11:00
Daniel Martí b9d13467b9 Add shfmt to the validate make target
We need to run on a directory since shell files might have no extension.
There are few shell files, so speed should not be an issue.

Fixes #1166.
2016-11-17 13:55:59 +00:00
Wang Long 2c74f86e23 Employ jq and state command to make sure that pid-file contains the right information
Signed-off-by: Wang Long <long.wanglong@huawei.com>
2016-10-25 15:48:38 +08:00
Shukui Yang dba9253d2b remove /tmp/bats from dev_runc
Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2016-10-09 09:43:22 +08:00
Qiang Huang da32c187bf Update golang to 1.7.1
Fixes: #1021

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-09-19 17:45:33 +08:00
Qiang Huang a8f66ffcaf Update golang to 1.7.0
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-08-31 14:32:02 +08:00
Qiang Huang 0c80599812 Combine runctestimage and runcimage
There is no need that keep them separate, it also
fixes #1006.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-08-30 09:46:47 +08:00
Ben Hall ec9d8769f0 Add a Dockerfile and a dbuild target. This allows you to build runC via Docker without having Golang installed on the host
Signed-off-by: Ben Hall <ben@benhall.me.uk>
2015-12-18 11:37:12 +00:00
Michael Crosby 8f97d39dd2 Move libcontainer into subdirectory
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-06-21 19:29:15 -07:00
boucher 206b5e6f1d First attempt at an integration test for checkpoint/restore.
Adds iptables as a requirement of criu in the Dockerfile.

Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
boucher b3ec1fce19 Add steps to install criu to the Dockerfile
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
Andrey Vagin 5231fbf143 Dockerfile: don't call go get
Everything must be in vendor/

Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrew Vagin 6922824833 Fix path to /dind
That script was moved a few days ago
https://github.com/docker/docker/pull/11373

Signed-off-by: Andrew Vagin <avagin@openvz.org>
2015-03-16 19:45:18 +03:00
Phil Estes ad3d14f1da Update to recent busybox 2014.11 tar
Move up to the latest busybox tarball that has the fix for `ip` command
segfault.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-03-12 17:54:43 -04:00
Mrunal Patel 6c285c1d49 Changes Dockerfile to use go 1.4
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2015-01-05 16:30:22 -05:00
Michael Crosby 1272b74cc0 Update the path to project from hack
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-11-14 15:43:19 -08:00
Hans Rødtang 9d86e0eae4 Updated cover tool import path.
Signed-off-by: Hans Rødtang <hansrodtang@gmail.com>
2014-11-14 06:05:18 +01:00
Michael Crosby 43145ecf1b Move the download of docker to top of dockerfile
We need to do this because it's a big dep.  While we remove this
recursive dep this is the best that we can do right now.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2014-10-17 00:00:16 +00:00
Tianon Gravi e9f44b52de Add "update-vendor.sh" script and vendor our current deps (minus Docker, since that'd make a circle)
Also, updated .travis.yml to use the new "vendor" directory (since this is pretty pointless without that :D)

Signed-off-by: Andrew Page <admwiggin@gmail.com>
2014-08-04 17:24:11 -06:00
Michael Crosby 4568ca76c8 Update imports for new docker location
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
2014-07-24 14:28:49 -07:00
Tianon Gravi 356f7a9136 Add a couple tweaks to the Dockerfile
- we don't need to add a "daemon" user to busybox; it already has one :)
- if we split out the "go get" from the "go install", we can have nice clean output on "docker build" of which dependencies we're pulling in and all the packages that get built :)

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
2014-07-23 19:07:07 -06:00