Comments (10)
Where does hostconfig go in 1.12?
from imagebuilder.
@smarterclayton from talking to @runcom, I think the problem is that HostConfig is part of image creation but not running, or something like that. I can reproduce the problem with imagebuilder on rawhide, so will see if I can fix it.
from imagebuilder.
@smarterclayton @jawnsy the HostConfig must be set at container create (docker create) as opposed to set it at container start (docker start). This has been a deprecated feature introduced in docker 1.12.x. Let me know if you need any other help on this.
from imagebuilder.
Just adding context... From the release notes: POST /containers/(id or name)/start no longer accepts a HostConfig.
from imagebuilder.
As discussed on IRC with @jawnsy and @mrunalp we can do the following:
- Create a new container that has the "fat" volume mounted that we docker cp into.
- Delete the container
- Bind mount from the volume into our new container for each individual bind.
We can probably reuse the same image that we'll be launching since it's guaranteed to be local and we won't be starting the container, just copying into it.
from imagebuilder.
Added a PR, please try it out and see if it works for you (can't get docker-latest running currently because of an older system)
from imagebuilder.
@smarterclayton Thanks for fixing this!
docker engine information
$ sudo dnf list --installed docker
docker.x86_64 2:1.12.1-13.git9a3752d.fc25
$ docker version
Client:
Version: 1.12.1
API version: 1.24
Package version: docker-1.12.1-13.git9a3752d.fc25.x86_64
Go version: go1.7.1
Git commit: 9a3752d/1.12.1
Built:
OS/Arch: linux/amd64
Server:
Version: 1.12.1
API version: 1.24
Package version: docker-1.12.1-13.git9a3752d.fc25.x86_64
Go version: go1.7.1
Git commit: 9a3752d/1.12.1
Built:
OS/Arch: linux/amd64
$ docker info
Containers: 3
Running: 1
Paused: 0
Stopped: 2
Images: 75
Server Version: 1.12.1
Storage Driver: overlay
Backing Filesystem: xfs
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
Volume: local
Network: host overlay bridge null
Swarm: inactive
Runtimes: runc oci
Default Runtime: oci
Security Options: seccomp
Kernel Version: 4.8.1-1.fc25.x86_64
Operating System: Fedora 25 (Twenty Five)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 2
CPUs: 2
Total Memory: 1.797 GiB
Name: limelight
ID: 34RW:RSXM:DEXS:EIS6:SV2U:7TDS:A2XY:RYBY:Q3UN:Z4CA:R6CR:IACW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
127.0.0.0/8
Registries: docker.io (secure)
Built the imagebuilder using:
$ git remote add smarterclayton https://github.com/smarterclayton/imagebuilder
$ git checkout smarterclayton/mount_secret
$ export GOPATH=~/projects/imagebuilder
$ go install -v github.com/openshift/imagebuilder/cmd/imagebuilder
Manually built the origin/openvswitch image:
$ imagebuilder ~/projects/origin/images/openvswitch openvswitch
<build output>
--> Committing changes to openvswitch ...
--> Done
Using the embedded imagebuilder (which doesn't include this change), reproducing the problem:
$ ~/projects/origin/_output/local/bin/linux/amd64/oc ex dockerbuild ~/projects/origin/images/openvswitch openvswitch
--> FROM openshift/origin-base
error: unable to start build container: API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}
So this change appears to have fixed it 😄 👍 🎉
from imagebuilder.
Unfortunately, the conformance tests are failing with 1.12. This requires further investigation, though at least it seems like a step in the right direction.
$ go test -v github.com/openshift/imagebuilder/dockerclient/ -tags conformance
=== RUN TestConformanceInternal
--- PASS: TestConformanceInternal (28.46s)
=== RUN TestConformanceExternal
--- PASS: TestConformanceExternal (485.71s)
conformance_test.go:299: WARNING: opt/app-root/src/.gem/ruby/gems/json-1.8.3/ext/json/ext/parser/Makefile differs only in size by -2 bytes, probably a timestamp value change
conformance_test.go:299: WARNING: opt/app-root/src/.gem/ruby/extensions/x86_64-linux/json-1.8.3/gem_make.out differs only in size by -1 bytes, probably a timestamp value change
conformance_test.go:299: WARNING: opt/app-root/src/.gem/ruby/gems/json-1.8.3/ext/json/ext/generator/Makefile differs only in size by -2 bytes, probably a timestamp value change
conformance_test.go:299: WARNING: etc/ssl/private/ssl-cert-snakeoil.key differs only in size by 4 bytes, probably a timestamp value change
=== RUN TestTransientMount
--- FAIL: TestTransientMount (1.25s)
conformance_test.go:167: unable to build image: running '/bin/sh -c ls /mountdir/subdir' failed with exit code 1
=== RUN TestCalcCopyInfo
--- PASS: TestCalcCopyInfo (0.00s)
FAIL
exit status 1
FAIL github.com/openshift/imagebuilder/dockerclient 515.426s
from imagebuilder.
@smarterclayton ping
I'm still seeing this issue with oc cluster up
with origin:v1.5.0
docker image.
$ oc cluster up
-- Checking OpenShift client ... OK
-- Checking Docker client ... OK
-- Checking Docker version ... OK
-- Checking for existing OpenShift container ... OK
-- Checking for openshift/origin:v1.5.0 image ... OK
-- Checking Docker daemon configuration ... OK
-- Checking for available ports ... OK
-- Checking type of volume mount ...
Using nsenter mounter for OpenShift volumes
-- Creating host directories ... OK
-- Finding server IP ...
Using 192.168.122.50 as the server IP
-- Starting OpenShift container ...
Creating initial OpenShift configuration
Starting OpenShift using container 'origin'
Waiting for API server to start listening
OpenShift server started
-- Adding default OAuthClient redirect URIs ... OK
-- Installing registry ... OK
-- Installing router ... OK
-- Importing image streams ... OK
-- Importing templates ... OK
-- Login to server ... OK
-- Creating initial project "myproject" ... OK
-- Removing temporary directory ... OK
-- Checking container networking ... OK
-- Server Information ...
OpenShift server started.
The server is accessible via web console at:
https://192.168.122.50:8443
You are logged in as:
User: developer
Password: developer
To login as administrator:
oc login -u system:admin
$ oc login -u system:admin
Logged into "https://192.168.122.50:8443" as "system:admin" using existing credentials.
You have access to the following projects and can switch between them with 'oc project <projectname>':
default
kube-system
* myproject
openshift
openshift-infra
Using project "myproject".
$ oc ex dockerbuild buildroot/ buildroot:latest
--> FROM centos:7
error: unable to start build container: API error (400): {"message":"starting container with HostConfig was deprecated since v1.10 and removed in v1.12"}
from imagebuilder.
from imagebuilder.
Related Issues (20)
- TestDispatchArgDefaultBuiltins is failing on arm/v8 HOT 4
- Regression in ENV expansion HOT 2
- COPY does not handle empty arguments well HOT 3
- Multi-stage Quarkus GraalVM builds do not produce runnable images HOT 5
- COPY --chown does not work right
- ADD should unpack archives HOT 5
- go install github.com/openshift/imagebuilder/cmd/[email protected] failed HOT 2
- Imagebuilder gets stuck while copying content between stages with --chown for a user with specific UID HOT 2
- Does imagebuilder support concurrent building? HOT 5
- issue in COPY from one stage to next HOT 8
- ENV does not inherit through multiple layers
- [Feature] Add --keep-ownership option to add/copy commands to keep file ownership. HOT 4
- dockerclient quietly ignores the --chmod flag for ADD/COPY HOT 3
- COPY tarball treats destination as directory
- Imagebuilder expands `ARGS` which are not declared HOT 3
- BUG: labels following missing line-continuation character are ignored HOT 7
- LCOWSupported method is not available in newer docker libs HOT 4
- Build image failed without docker HOT 5
- TestDispatchFromFlagsAndUseBuiltInArgs fails on arm HOT 4
- Generic way to build the first stage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagebuilder.