anyproto / any-sync-dockercompose

docker-compose for testing any-sync
MIT License
234 stars 29 forks source link

Step 6/15 : COPY --chmod=777 docker-generateconfig/generate_config.sh .env . the --chmod option requires BuildKit. #35

Closed anthonyattacks closed 3 months ago

anthonyattacks commented 3 months ago

Have you read a contributing guide?

Current Behavior

happy@anytype:~$ git clone https://github.com/anyproto/any-sync-dockercompose.git Cloning into 'any-sync-dockercompose'... remote: Enumerating objects: 476, done. remote: Counting objects: 100% (187/187), done. remote: Compressing objects: 100% (103/103), done. remote: Total 476 (delta 87), reused 159 (delta 82), pack-reused 289 Receiving objects: 100% (476/476), 100.50 KiB | 677.00 KiB/s, done. Resolving deltas: 100% (264/264), done. happy@anytype:~$ ls any-sync-dockercompose happy@anytype:~$ cd any-sync-dockercompose/ happy@anytype:~/any-sync-dockercompose$ make start mkdir -p ./storage/docker-generateconfig/ docker build -t generateconfig -f Dockerfile-generateconfig . DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/

permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile-generateconfig&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=generateconfig&target=&ulimits=null&version=1": dial unix /var/run/docker.sock: connect: permission denied make: *** [Makefile:6: generate_config] Error 1 happy@anytype:~/any-sync-dockercompose$ sudo make start mkdir -p ./storage/docker-generateconfig/ docker build -t generateconfig -f Dockerfile-generateconfig . DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/

Sending build context to Docker daemon 243.2kB Step 1/15 : FROM golang:1.21.6-alpine3.19 as generator 1.21.6-alpine3.19: Pulling from library/golang 4abcf2066143: Pull complete e8e7baba97f5: Pull complete dae04b0c6bbc: Pull complete 5ac343c6ec1b: Pull complete 4f4fb700ef54: Pull complete Digest: sha256:a6a7f1fcf12f5efa9e04b1e75020931a616cd707f14f62ab5262bfbe109aa84a Status: Downloaded newer image for golang:1.21.6-alpine3.19 ---> 1139ce7fbe82 Step 2/15 : RUN apk add --no-cache bash yq ---> Running in 4378d27a9e11 fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz (1/5) Installing ncurses-terminfo-base (6.4_p20231125-r0) (2/5) Installing libncursesw (6.4_p20231125-r0) (3/5) Installing readline (8.2.1-r2) (4/5) Installing bash (5.2.21-r0) Executing bash-5.2.21-r0.post-install (5/5) Installing yq (4.35.2-r2) Executing busybox-1.36.1-r15.trigger OK: 19 MiB in 21 packages Removing intermediate container 4378d27a9e11 ---> b5c4cbd58555 Step 3/15 : RUN go install github.com/anyproto/any-sync-tools/anyconf@latest ---> Running in c7ddc21f9088 go: downloading github.com/anyproto/any-sync-tools v0.0.4 go: downloading github.com/anyproto/any-sync v0.3.1 go: downloading github.com/spf13/cobra v1.7.0 go: downloading golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 go: downloading gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 go: downloading gopkg.in/yaml.v3 v3.0.1 go: downloading github.com/anyproto/go-chash v0.1.0 go: downloading go.uber.org/zap v1.26.0 go: downloading filippo.io/edwards25519 v1.0.0 go: downloading github.com/anyproto/go-slip10 v1.0.0 go: downloading github.com/anyproto/go-slip21 v1.0.0 go: downloading github.com/gogo/protobuf v1.3.2 go: downloading github.com/libp2p/go-libp2p v0.31.0 go: downloading github.com/multiformats/go-multibase v0.2.0 go: downloading github.com/tyler-smith/go-bip39 v1.1.0 go: downloading golang.org/x/crypto v0.13.0 go: downloading github.com/spf13/pflag v1.0.5 go: downloading github.com/gobwas/glob v0.2.3 go: downloading github.com/cespare/xxhash v1.1.0 go: downloading go.uber.org/multierr v1.11.0 go: downloading github.com/mr-tron/base58 v1.2.0 go: downloading github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 go: downloading google.golang.org/protobuf v1.31.0 go: downloading github.com/ipfs/go-cid v0.4.1 go: downloading github.com/multiformats/go-multiaddr v0.11.0 go: downloading github.com/multiformats/go-multicodec v0.9.0 go: downloading github.com/multiformats/go-multihash v0.2.3 go: downloading github.com/multiformats/go-base32 v0.1.0 go: downloading github.com/multiformats/go-base36 v0.2.0 go: downloading golang.org/x/sys v0.12.0 go: downloading github.com/multiformats/go-varint v0.0.7 go: downloading github.com/libp2p/go-buffer-pool v0.1.0 go: downloading lukechampine.com/blake3 v1.2.1 go: downloading github.com/spaolacci/murmur3 v1.1.0 go: downloading github.com/klauspost/cpuid/v2 v2.2.5 Removing intermediate container c7ddc21f9088 ---> 3ea41fdfd07c Step 4/15 : WORKDIR /opt/generateconfig ---> Running in ecf386b87d6a Removing intermediate container ecf386b87d6a ---> 0f04b4b740fe Step 5/15 : COPY ./storage/docker-generateconfig/ . ---> 58d6b4ce8316 **Step 6/15 : COPY --chmod=777 docker-generateconfig/generate_config.sh .env . the --chmod option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled make: * [Makefile:6: generate_config] Error 1

Expected Behavior

Process continues

Steps To Reproduce

Fresh LXC for Ubuntu 22.04 LTS server created, updated, git, curl, make, docker, docker-compose installed git clone https://github.com/anyproto/any-sync-dockercompose.git cd any-sync-dockercompose make start

Same behavior with a fresh install of Ubuntu 22.04 LTS in a VM, so not container-inherent

Environment

- OS: Linux; Debian-based
- Version: Ubuntu Server 22.04 LTS

Both fresh LXC and fresh VM with newest docker version which includes native support for buildkit

Anything else?

No response

fb929 commented 3 months ago

check this page - https://forums.docker.com/t/buildkit-not-working-with-docker-compose-in-linux/133879 by default, on ubuntu 22.04 installing docker-compose version 1.x. You need to update docker-compose to 2.x