Merge pull request #1351 from justincormack/cmd

Move Go code to `src/cmd`
This commit is contained in:
Justin Cormack 2017-03-21 15:26:28 +00:00 committed by GitHub
commit d24f5b4158
8 changed files with 8 additions and 4 deletions

View File

@ -4,7 +4,7 @@ all: default
GO_COMPILE=mobylinux/go-compile:3afebc59c5cde31024493c3f91e6102d584a30b9@sha256:e0786141ea7df8ba5735b63f2a24b4ade9eae5a02b0e04c4fca33b425ec69b0a
MOBY_DEPS=$(wildcard *.go) pkg vendor
MOBY_DEPS=$(wildcard src/cmd/moby/*.go)
GOOS=$(shell uname -s | tr '[:upper:]' '[:lower:]')
GOARCH=amd64
ifneq ($(GOOS),linux)
@ -12,7 +12,7 @@ CROSS=-e GOOS=$(GOOS) -e GOARCH=$(GOARCH)
endif
bin/moby: $(MOBY_DEPS) | bin
tar cf - $(MOBY_DEPS) | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/docker/moby -o $@ | tar xf -
tar cf - vendor src/initrd src/pad4 -C src/cmd/moby . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/docker/moby -o $@ | tar xf -
moby-initrd.img: bin/moby moby.yaml
$^

View File

@ -20,6 +20,10 @@ Moby, a toolkit for building custom minimal, immutable Linux distributions.
Simple build instructions: use `make` to build.
This will build the Moby customisation tool and a Moby initrd image.
If you already have a Go build environment and installed the source in your `GOPATH`
you can do `go install github.com/docker/moby/cmd/moby` to install the `moby` tool
instead, and then use `moby moby.yaml` to build the example configuration.
#### Build requirements
- GNU `make`

View File

@ -12,7 +12,7 @@ import (
"os/exec"
"path/filepath"
"github.com/docker/moby/pkg/initrd"
"github.com/docker/moby/src/initrd"
)
const (

View File

@ -7,7 +7,7 @@ import (
"errors"
"io"
"github.com/docker/moby/pkg/pad4"
"github.com/docker/moby/src/pad4"
"github.com/surma/gocpio"
)