Skip to content

build interrupts after COPY/ADD command in Dockerfile #84

@akloeber

Description

@akloeber

The following Dockerfile succeeds to build an image with docker:

FROM dockerfile/java:oracle-java7
RUN mkdir -p /opt/selenium
COPY selenium-server-standalone-2.44.0.jar /opt/selenium/selenium-server-standalone.jar
RUN echo not executed through decking g
EXPOSE 4444
ENTRYPOINT ["java", "-jar", "/opt/selenium/selenium-server-standalone.jar"]

$ docker build -t img-selenium-base selenium-base
Sending build context to Docker daemon 35.17 MB
Sending build context to Docker daemon 
Step 0 : FROM dockerfile/java:oracle-java7
 ---> 6f2d4b7c53a2
Step 1 : RUN mkdir -p /opt/selenium
 ---> Using cache
 ---> e6f396f6a743
Step 2 : COPY selenium-server-standalone-2.44.0.jar /opt/selenium/selenium-server-standalone.jar
 ---> Using cache
 ---> 699f59fc00e6
Step 3 : RUN echo not executed through decking g
 ---> Using cache
 ---> a022ecbfb59d
Step 4 : EXPOSE 4444
 ---> Using cache
 ---> d01095ca9cd8
Step 5 : ENTRYPOINT java -jar /opt/selenium/selenium-server-standalone.jar
 ---> Running in f5a881a9b582
 ---> ca86c1f2eb8a
Removing intermediate container f5a881a9b582
Successfully built ca86c1f2eb8a

But when used to build with decking the build interrupts after the COPY command:

$ decking build all
Looking up build data for img-selenium-base
Building image img-selenium-base from ./selenium-base/Dockerfile
Uploading compressed context...
Step 0 : FROM dockerfile/java:oracle-java7
 ---> 6f2d4b7c53a2
Step 1 : RUN mkdir -p /opt/selenium
 ---> Using cache
 ---> e6f396f6a743
Step 2 : COPY selenium-server-standalone-2.44.0.jar /opt/selenium/selenium-server-standalone.jar

The corresponding decking.json is:

{
  "images": {
    "img-selenium-base": "./selenium-base"
  },
  "containers": {
    "selenium": {
      "image": "img-selenium-base",
      "port": ["4444:4444"]
    }
  },
  "clusters": {
    "main": ["selenium"]
  }
}

The same applies if the ADD command is used instead or if the syntax COPY ["selenium-server-standalone-2.44.0.jar", "/opt/selenium/selenium-server-standalone.jar"] is used.

Environment:
Mac OS X 10.10.2
decking 0.3.0

docker version output:
Client version: 1.5.0
Client API version: 1.17
Go version (client): go1.4.1
Git commit (client): a8a31ef
OS/Arch (client): darwin/amd64
Server version: 1.5.0
Server API version: 1.17
Go version (server): go1.4.1
Git commit (server): a8a31ef

boot2docker version output:
Boot2Docker-cli version: v1.5.0
Git commit: ccd9032

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions