Opened 10 years ago

Closed 8 years ago

#43260 closed submission (fixed)

[NEW] docker

Reported by: jul_bsd@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: eric@…, ci42, petrrr, mkae (Marko Käning), pixilla (Bradley Giesbrecht), mcamou@…
Port: docker

Description

open source project to pack, ship and run any application as a lightweight container

  • not usable
  • any Portgroup or special command for go language package
  • build fails
:debug:build Assembled command: 'cd "/Volumes/Data/opt/local/var/macports/build/_Volumes_Data_myports_sysutils_docker/docker/work/docker-" && go build docker/docker.go'
:debug:build Executing command line:  cd "/Volumes/Data/opt/local/var/macports/build/_Volumes_Data_myports_sysutils_docker/docker/work/docker-" && go build docker/docker.go 
:info:build docker/docker.go:9:2: cannot find package "github.com/dotcloud/docker/api" in any of: 
:info:build     /opt/local/go/src/pkg/github.com/dotcloud/docker/api (from $GOROOT)
:info:build     /Volumes/Data/opt/local/var/macports/build/_Volumes_Data_myports_sysutils_docker/docker/work/src/github.com/dotcloud/docker/api (from $GOPATH)
:info:build docker/docker.go:10:2: cannot find package "github.com/dotcloud/docker/builtins" in any of: 
:info:build     /opt/local/go/src/pkg/github.com/dotcloud/docker/builtins (from $GOROOT)
:info:build     /Volumes/Data/opt/local/var/macports/build/_Volumes_Data_myports_sysutils_docker/docker/work/src/github.com/dotcloud/docker/builtins (from $GOPATH)

Attachments (3)

Portfile (1.5 KB) - added by jul_bsd@… 10 years ago.
Portfile.2 (1.3 KB) - added by steve@… 9 years ago.
Working Portfile based on homebrew formula
Portfile.3 (2.6 KB) - added by ajdudman 9 years ago.
corrected and enhanced Portfile for recent source code

Download all attachments as: .zip

Change History (24)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Some observations:

  • "APL2" is not a license that we recognize. I think you meant "Apache-2".
  • Since this is hosted at github, consider using the github portgroup.
  • Do you really need to fetch from git? If you can fetch from a tarball that would be preferable, and it's what the github portgroup will do by default.
  • You should specify the absolute path to go in build.cmd
  • You don't need to specify destroot.cmd since its default value is ${build.cmd}

comment:2 Changed 10 years ago by jul_bsd@…

Where I can find an up-to-date list of recognized license and portgroup? The guide has only a subset. any link to the corresponding source code?

  • license, portsource, fetch , absolute path to go fixed
  • portgroup github doesn't change master_sites & distname & worksrcdir ?
  • what about the built issue with go? no go portgroup?

comment:3 Changed 10 years ago by eric@…

Cc: eric@… added

Cc Me!

comment:4 Changed 10 years ago by ci42

Cc: ciserlohn@… added

Cc Me!

comment:5 Changed 10 years ago by jul_bsd@…

little changes but it doesn't seem there is a port using go lang :(

$ port dependents go
go has no dependents.

Changed 10 years ago by jul_bsd@…

Attachment: Portfile added

comment:6 Changed 10 years ago by petrrr

Cc: petr@… added

Cc Me!

comment:7 Changed 9 years ago by mkae (Marko Käning)

Cc: mk@… added

Cc Me!

Changed 9 years ago by steve@…

Attachment: Portfile.2 added

Working Portfile based on homebrew formula

comment:9 in reply to:  2 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Replying to jul_bsd@…:

Where I can find an up-to-date list of recognized license and port group?

See PortfileRecipes#licensekeyword for licenses used in Portfiles.

comment:10 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Cc: pixilla@… added

Cc Me!

comment:11 Changed 9 years ago by mcamou@…

Last edited 9 years ago by mcamou@… (previous) (diff)

comment:12 Changed 9 years ago by mcamou@…

Cc: mcamou@… added

Cc Me!

comment:13 Changed 9 years ago by pixilla (Bradley Giesbrecht)

According to docs.docker.com docker requires Snow Leopard or newer on OS X, add something like:

if {${os.version} < 10} {
    pre-fetch {
        ui_error "${name} requires Snow Leopard or newer."
        error "unsupported platform"
    }
}

Darwin OS X version table

Last edited 9 years ago by pixilla (Bradley Giesbrecht) (previous) (diff)

comment:14 Changed 9 years ago by ajdudman

The above is a good idea, but the logic is flawed. Swap the arguments to vercmp. Change "later" to "earlier" or "before" or "prior".

comment:15 Changed 9 years ago by ajdudman

Last edited 9 years ago by ajdudman (previous) (diff)

comment:16 Changed 9 years ago by ajdudman

In hack/make.sh comments, it says, "specify the exact (--short) commit hash you are building using DOCKER_GITCOMMIT." In other words, DOCKER_GITCOMMIT should be set to the first seven digits of the hash, like what this does, $(git rev-parse --short HEAD).

comment:17 Changed 9 years ago by ajdudman

Last edited 9 years ago by ajdudman (previous) (diff)

comment:18 Changed 9 years ago by ajdudman

Here is my try at writing the Portfile. I also read the homebrew formula first. I recoded pixilla's suggestion above. The docker project is progressing rapidly. This one is for version 1.6.2, but 1.7.0 release candidates are being worked on now.

comment:19 in reply to:  18 Changed 9 years ago by pixilla (Bradley Giesbrecht)

Replying to ajdudman@…:

Here is my try at writing the Portfile. I also read the homebrew formula first. I recoded pixilla's suggestion above. The docker project is progressing rapidly. This one is for version 1.6.2, but 1.7.0 release candidates are being worked on now.

In your Portfile you are erroring if "${os.major} < 11". Snow Leopard is darwin 10 and will hit this block. My example in comment 13 should be correct.

Last edited 9 years ago by pixilla (Bradley Giesbrecht) (previous) (diff)

Changed 9 years ago by ajdudman

Attachment: Portfile.3 added

corrected and enhanced Portfile for recent source code

comment:20 Changed 9 years ago by ajdudman

Thanks pixilla. I see my mistake. I have corrected and replaced my Portfile.3 using 10 instead of 11 and your newer ui_error line.

comment:21 Changed 8 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

Docker is meanwhile available in MacPorts. Closing this as no longer relevant.

Note: See TracTickets for help on using tickets.