Skip to content

Commit

Permalink
rename to docker/buildx
Browse files Browse the repository at this point in the history
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
  • Loading branch information
tonistiigi committed Apr 25, 2019
1 parent 9aafa80 commit 94a0422
Show file tree
Hide file tree
Showing 26 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Expand Up @@ -16,7 +16,7 @@ WORKDIR /src

FROM gobase AS buildx-version
RUN --mount=target=. \
PKG=github.com/tonistiigi/buildx VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi); \
PKG=github.com/docker/buildx VERSION=$(git describe --match 'v[0-9]*' --dirty='.m' --always --tags) REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi); \
echo "-X ${PKG}/version.Version=${VERSION} -X ${PKG}/version.Revision=${REVISION} -X ${PKG}/version.Package=${PKG}" | tee /tmp/.ldflags; \
echo -n "${VERSION}" | tee /tmp/.version;

Expand Down
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -55,7 +55,7 @@ https://download.docker.com/mac/static/nightly/

### Binary release

Download the latest binary release from https://github.com/tonistiigi/buildx/releases/latest and copy it to `~/.docker/cli-plugins` folder with name `docker-buildx`.
Download the latest binary release from https://github.com/docker/buildx/releases/latest and copy it to `~/.docker/cli-plugins` folder with name `docker-buildx`.


After installing you can run `docker buildx` to see the new commands.
Expand All @@ -64,15 +64,15 @@ After installing you can run `docker buildx` to see the new commands.

### with Docker 18.09+
```
$ git clone git://github.com/tonistiigi/buildx && cd buildx
$ git clone git://github.com/docker/buildx && cd buildx
$ make install
```

### with buildx or Docker 19.03
```
$ export DOCKER_BUILDKIT=1
$ # choose a platform that matches your architecture
$ docker build --target=binaries --platform=[darwin,windows,linux,linux/arm64] -o . git://github.com/tonistiigi/buildx
$ docker build --target=binaries --platform=[darwin,windows,linux,linux/arm64] -o . git://github.com/docker/buildx
$ mv buildx ~/.docker/cli-plugins/docker-buildx
```

Expand Down
4 changes: 2 additions & 2 deletions bake/bake.go
Expand Up @@ -5,10 +5,10 @@ import (
"io/ioutil"
"strings"

"github.com/docker/buildx/build"
"github.com/docker/buildx/util/platformutil"
"github.com/moby/buildkit/session/auth/authprovider"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/build"
"github.com/tonistiigi/buildx/util/platformutil"
)

func ReadTargets(ctx context.Context, files, targets, overrides []string) (map[string]Target, error) {
Expand Down
6 changes: 3 additions & 3 deletions build/build.go
Expand Up @@ -14,6 +14,9 @@ import (

"github.com/containerd/containerd/images"
"github.com/containerd/containerd/platforms"
"github.com/docker/buildx/driver"
"github.com/docker/buildx/util/imagetools"
"github.com/docker/buildx/util/progress"
clitypes "github.com/docker/cli/cli/config/types"
"github.com/docker/distribution/reference"
dockerclient "github.com/docker/docker/client"
Expand All @@ -25,9 +28,6 @@ import (
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/tonistiigi/buildx/driver"
"github.com/tonistiigi/buildx/util/imagetools"
"github.com/tonistiigi/buildx/util/progress"
"golang.org/x/sync/errgroup"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/buildx/main.go
Expand Up @@ -4,16 +4,16 @@ import (
"fmt"
"os"

"github.com/docker/buildx/commands"
"github.com/docker/buildx/version"
"github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli-plugins/plugin"
"github.com/docker/cli/cli/command"
cliflags "github.com/docker/cli/cli/flags"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/commands"
"github.com/tonistiigi/buildx/version"

_ "github.com/tonistiigi/buildx/driver/docker"
_ "github.com/tonistiigi/buildx/driver/docker-container"
_ "github.com/docker/buildx/driver/docker"
_ "github.com/docker/buildx/driver/docker-container"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion commands/bake.go
Expand Up @@ -5,11 +5,11 @@ import (
"fmt"
"os"

"github.com/docker/buildx/bake"
"github.com/docker/cli/cli/command"
"github.com/moby/buildkit/util/appcontext"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/bake"
)

type bakeOptions struct {
Expand Down
6 changes: 3 additions & 3 deletions commands/build.go
Expand Up @@ -5,6 +5,9 @@ import (
"os"
"strings"

"github.com/docker/buildx/build"
"github.com/docker/buildx/util/platformutil"
"github.com/docker/buildx/util/progress"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/moby/buildkit/client"
Expand All @@ -13,9 +16,6 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/tonistiigi/buildx/build"
"github.com/tonistiigi/buildx/util/platformutil"
"github.com/tonistiigi/buildx/util/progress"
)

type buildOptions struct {
Expand Down
4 changes: 2 additions & 2 deletions commands/create.go
Expand Up @@ -4,14 +4,14 @@ import (
"fmt"
"os"

"github.com/docker/buildx/driver"
"github.com/docker/buildx/store"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/moby/buildkit/util/appcontext"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/driver"
"github.com/tonistiigi/buildx/store"
)

type createOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion commands/imagetools/create.go
Expand Up @@ -6,14 +6,14 @@ import (
"io/ioutil"
"strings"

"github.com/docker/buildx/util/imagetools"
"github.com/docker/cli/cli/command"
"github.com/docker/distribution/reference"
"github.com/moby/buildkit/util/appcontext"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/util/imagetools"
"golang.org/x/sync/errgroup"
)

Expand Down
2 changes: 1 addition & 1 deletion commands/imagetools/inspect.go
Expand Up @@ -5,12 +5,12 @@ import (
"os"

"github.com/containerd/containerd/images"
"github.com/docker/buildx/util/imagetools"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/moby/buildkit/util/appcontext"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/util/imagetools"
)

type inspectOptions struct {
Expand Down
10 changes: 5 additions & 5 deletions commands/inspect.go
Expand Up @@ -8,16 +8,16 @@ import (
"text/tabwriter"
"time"

"github.com/docker/buildx/build"
"github.com/docker/buildx/driver"
"github.com/docker/buildx/store"
"github.com/docker/buildx/util/platformutil"
"github.com/docker/buildx/util/progress"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/moby/buildkit/util/appcontext"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/build"
"github.com/tonistiigi/buildx/driver"
"github.com/tonistiigi/buildx/store"
"github.com/tonistiigi/buildx/util/platformutil"
"github.com/tonistiigi/buildx/util/progress"
"golang.org/x/sync/errgroup"
)

Expand Down
4 changes: 2 additions & 2 deletions commands/ls.go
Expand Up @@ -9,12 +9,12 @@ import (
"text/tabwriter"
"time"

"github.com/docker/buildx/store"
"github.com/docker/buildx/util/platformutil"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/moby/buildkit/util/appcontext"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/store"
"github.com/tonistiigi/buildx/util/platformutil"
"golang.org/x/sync/errgroup"
)

Expand Down
2 changes: 1 addition & 1 deletion commands/rm.go
Expand Up @@ -3,11 +3,11 @@ package commands
import (
"context"

"github.com/docker/buildx/store"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/moby/buildkit/util/appcontext"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/store"
)

type rmOptions struct {
Expand Down
2 changes: 1 addition & 1 deletion commands/root.go
@@ -1,10 +1,10 @@
package commands

import (
imagetoolscmd "github.com/docker/buildx/commands/imagetools"
"github.com/docker/cli/cli-plugins/plugin"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
imagetoolscmd "github.com/tonistiigi/buildx/commands/imagetools"
)

func NewRootCmd(name string, isPlugin bool, dockerCli command.Cli) *cobra.Command {
Expand Down
8 changes: 4 additions & 4 deletions commands/util.go
Expand Up @@ -5,15 +5,15 @@ import (
"os"
"path/filepath"

"github.com/docker/buildx/build"
"github.com/docker/buildx/driver"
"github.com/docker/buildx/store"
"github.com/docker/buildx/util/platformutil"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/context/docker"
dopts "github.com/docker/cli/opts"
dockerclient "github.com/docker/docker/client"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/build"
"github.com/tonistiigi/buildx/driver"
"github.com/tonistiigi/buildx/store"
"github.com/tonistiigi/buildx/util/platformutil"
"golang.org/x/sync/errgroup"
)

Expand Down
2 changes: 1 addition & 1 deletion commands/version.go
Expand Up @@ -3,10 +3,10 @@ package commands
import (
"fmt"

"github.com/docker/buildx/version"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
"github.com/tonistiigi/buildx/version"
)

func runVersion(dockerCli command.Cli) error {
Expand Down
4 changes: 2 additions & 2 deletions driver/docker-container/driver.go
Expand Up @@ -8,6 +8,8 @@ import (
"os"
"time"

"github.com/docker/buildx/driver"
"github.com/docker/buildx/util/progress"
"github.com/docker/docker/api/types"
dockertypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
Expand All @@ -16,8 +18,6 @@ import (
"github.com/docker/docker/pkg/stdcopy"
"github.com/moby/buildkit/client"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/driver"
"github.com/tonistiigi/buildx/util/progress"
)

var buildkitImage = "moby/buildkit:master" // TODO: make this verified and configuratble
Expand Down
2 changes: 1 addition & 1 deletion driver/docker-container/factory.go
Expand Up @@ -3,9 +3,9 @@ package docker
import (
"context"

"github.com/docker/buildx/driver"
dockerclient "github.com/docker/docker/client"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/driver"
)

const prioritySupported = 30
Expand Down
4 changes: 2 additions & 2 deletions driver/docker/driver.go
Expand Up @@ -5,10 +5,10 @@ import (
"net"
"time"

"github.com/docker/buildx/driver"
"github.com/docker/buildx/util/progress"
"github.com/moby/buildkit/client"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/driver"
"github.com/tonistiigi/buildx/util/progress"
)

type Driver struct {
Expand Down
2 changes: 1 addition & 1 deletion driver/docker/factory.go
Expand Up @@ -3,9 +3,9 @@ package docker
import (
"context"

"github.com/docker/buildx/driver"
dockerclient "github.com/docker/docker/client"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/driver"
)

const prioritySupported = 10
Expand Down
2 changes: 1 addition & 1 deletion driver/driver.go
Expand Up @@ -3,9 +3,9 @@ package driver
import (
"context"

"github.com/docker/buildx/util/progress"
"github.com/moby/buildkit/client"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/util/progress"
)

var ErrNotRunning = errors.Errorf("driver not running")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
@@ -1,4 +1,4 @@
module github.com/tonistiigi/buildx
module github.com/docker/buildx

require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfiles/lint.Dockerfile
Expand Up @@ -5,6 +5,6 @@ RUN apk add --no-cache git
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 \
&& mv /go/bin/gometalinter.v1 /go/bin/gometalinter \
&& gometalinter --install
WORKDIR /go/src/github.com/tonistiigi/buildx
RUN --mount=target=/go/src/github.com/tonistiigi/buildx \
WORKDIR /go/src/github.com/docker/buildx
RUN --mount=target=/go/src/github.com/docker/buildx \
gometalinter --config=gometalinter.json ./...
2 changes: 1 addition & 1 deletion store/nodegroup.go
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"

"github.com/containerd/containerd/platforms"
"github.com/docker/buildx/util/platformutil"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
"github.com/tonistiigi/buildx/util/platformutil"
)

type NodeGroup struct {
Expand Down
2 changes: 1 addition & 1 deletion store/nodegroup_test.go
Expand Up @@ -3,8 +3,8 @@ package store
import (
"testing"

"github.com/docker/buildx/util/platformutil"
"github.com/stretchr/testify/require"
"github.com/tonistiigi/buildx/util/platformutil"
)

func TestNodeGroupUpdate(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Expand Up @@ -2,7 +2,7 @@ package version

var (
// Package is filled at linking time
Package = "github.com/tonistiigi/buildx"
Package = "github.com/docker/buildx"

// Version holds the complete version number. Filled in at linking time.
Version = "0.0.0+unknown"
Expand Down

0 comments on commit 94a0422

Please sign in to comment.