mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-25 03:34:58 +00:00
Merge pull request #1351 from justincormack/cmd
Move Go code to `src/cmd`
This commit is contained in:
commit
d24f5b4158
4
Makefile
4
Makefile
@ -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
|
||||
$^
|
||||
|
@ -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`
|
||||
|
@ -12,7 +12,7 @@ import (
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/docker/moby/pkg/initrd"
|
||||
"github.com/docker/moby/src/initrd"
|
||||
)
|
||||
|
||||
const (
|
@ -7,7 +7,7 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
|
||||
"github.com/docker/moby/pkg/pad4"
|
||||
"github.com/docker/moby/src/pad4"
|
||||
"github.com/surma/gocpio"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user