mattermost / focalboard

Focalboard is an open source, self-hosted alternative to Trello, Notion, and Asana.
https://www.focalboard.com
Other
20.72k stars 1.82k forks source link

Bug: Docker build fails on Debian Buster as of `1cc2337` #574

Open jmcph4 opened 3 years ago

jmcph4 commented 3 years ago

Summary: As of 1cc2337, building via Docker fails. The associated README specifies a fairly ordinary Docker build, which is used to reproduce this bug.

Steps to reproduce the behavior:

  1. Install Docker
  2. $ git clone https://github.com/mattermost/focalboard
    $ cd focalboard/docker
    $ sudo docker-build . -t foobar

Expected behavior: For the build to succeed, as per the instructions in the aforementioned README.

Screenshots:

Sending build context to Docker daemon  9.216kB
Step 1/18 : FROM golang:alpine as gobuild
alpine: Pulling from library/golang
540db60ca938: Already exists 
adcc1eea9eea: Pull complete 
4c4ab2625f07: Pull complete 
e25adedf14fe: Pull complete 
b52c85161d43: Pull complete 
Digest: sha256:d312fd160b846cc88569468416d6786dc882cf78dc7157a66f6e3a72b05df06f
Status: Downloaded newer image for golang:alpine
 ---> a84d737792c2
Step 2/18 : RUN apk update &&     apk add ca-certificates gcc git make musl-dev &&     git clone https://github.com/mattermost/focalboard &&     cd focalboard &&     make server-linux
 ---> Running in c72595613eee
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
v3.13.5-194-g1274644b64 [https://dl-cdn.alpinelinux.org/alpine/v3.13/main]
v3.13.5-187-g1477654ee3 [https://dl-cdn.alpinelinux.org/alpine/v3.13/community]
OK: 13889 distinct packages available
(1/19) Installing libgcc (10.2.1_pre1-r3)
(2/19) Installing libstdc++ (10.2.1_pre1-r3)
(3/19) Installing binutils (2.35.2-r1)
(4/19) Installing libgomp (10.2.1_pre1-r3)
(5/19) Installing libatomic (10.2.1_pre1-r3)
(6/19) Installing libgphobos (10.2.1_pre1-r3)
(7/19) Installing gmp (6.2.1-r0)
(8/19) Installing isl22 (0.22-r0)
(9/19) Installing mpfr4 (4.1.0-r0)
(10/19) Installing mpc1 (1.2.0-r0)
(11/19) Installing gcc (10.2.1_pre1-r3)
(12/19) Installing brotli-libs (1.0.9-r3)
(13/19) Installing nghttp2-libs (1.42.0-r1)
(14/19) Installing libcurl (7.77.0-r1)
(15/19) Installing expat (2.2.10-r1)
(16/19) Installing pcre2 (10.36-r0)
(17/19) Installing git (2.30.2-r0)
(18/19) Installing make (4.3-r0)
(19/19) Installing musl-dev (1.2.2-r1)
Executing busybox-1.32.1-r6.trigger
OK: 140 MiB in 34 packages
Cloning into 'focalboard'...
mkdir -p bin/linux
cd server; env GOOS=linux GOARCH=amd64 go build -ldflags '-X "github.com/mattermost/focalboard/server/model.BuildNumber=dev" -X "github.com/mattermost/focalboard/server/model.BuildDate=Mon Jun 14 01:12:26 UTC 2021" -X "github.com/mattermost/focalboard/server/model.BuildHash=1cc2337948b5622e45c22f69d97a5a1cdb0de27c" -X "github.com/mattermost/focalboard/server/model.Edition=linux"' -o ../bin/linux/focalboard-server ./main
go: downloading github.com/google/uuid v1.2.0
go: downloading github.com/gorilla/mux v1.8.0
go: downloading github.com/mattermost/mattermost-server/v5 v5.3.2-0.20210524045451-a4f7df6f6e3c
go: downloading github.com/oklog/run v1.1.0
go: downloading github.com/pkg/errors v0.9.1
go: downloading github.com/spf13/viper v1.7.1
go: downloading github.com/mattermost/logr v1.0.13
go: downloading github.com/mattermost/logr/v2 v2.0.2
go: downloading github.com/prometheus/client_golang v1.10.0
go: downloading github.com/Masterminds/squirrel v1.5.0
go: downloading github.com/go-sql-driver/mysql v1.5.0
go: downloading github.com/golang-migrate/migrate/v4 v4.14.1
go: downloading github.com/lib/pq v1.10.0
go: downloading github.com/mattn/go-sqlite3 v2.0.3+incompatible
go: downloading github.com/rudderlabs/analytics-go v3.3.1+incompatible
go: downloading github.com/gorilla/websocket v1.4.2
go: downloading github.com/minio/minio-go/v7 v7.0.10
go: downloading github.com/stretchr/testify v1.7.0
go: downloading github.com/fsnotify/fsnotify v1.4.9
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/magiconair/properties v1.8.5
go: downloading github.com/mitchellh/mapstructure v1.4.1
go: downloading github.com/pelletier/go-toml v1.8.1
go: downloading github.com/spf13/afero v1.6.0
go: downloading github.com/spf13/cast v1.3.1
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/subosito/gotenv v1.2.0
go: downloading gopkg.in/ini.v1 v1.62.0
go: downloading gopkg.in/yaml.v2 v2.4.0
go: downloading github.com/wiggin77/merror v1.0.3
go: downloading github.com/francoispqt/gojay v1.2.13
go: downloading golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading github.com/golang/protobuf v1.5.1
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.20.0
go: downloading github.com/prometheus/procfs v0.6.0
go: downloading github.com/lann/builder v0.0.0-20180802200727-47ae307949d0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/segmentio/backo-go v0.0.0-20200129164019-23eae7c10bd3
go: downloading github.com/tidwall/gjson v1.7.3
go: downloading github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c
go: downloading github.com/wiggin77/srslog v1.0.1
go: downloading go.uber.org/zap v1.16.0
go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0
go: downloading github.com/json-iterator/go v1.1.10
go: downloading github.com/minio/md5-simd v1.1.2
go: downloading github.com/minio/sha256-simd v1.0.0
go: downloading golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4
go: downloading github.com/mitchellh/go-homedir v1.1.0
go: downloading github.com/blang/semver v3.5.1+incompatible
go: downloading github.com/disintegration/imaging v1.6.2
go: downloading github.com/dyatlov/go-opengraph v0.0.0-20210112100619-dae8665a5b09
go: downloading github.com/mattermost/ldap v0.0.0-20201202150706-ee0e6284187d
go: downloading github.com/pborman/uuid v1.2.1
go: downloading github.com/tinylib/msgp v1.1.5
go: downloading golang.org/x/text v0.3.5
go: downloading github.com/mattermost/go-i18n v1.11.0
go: downloading golang.org/x/sys v0.0.0-20210324051608-47abb6519492
go: downloading google.golang.org/protobuf v1.26.0
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/tidwall/match v1.0.3
go: downloading github.com/tidwall/pretty v1.1.0
go: downloading github.com/wiggin77/cfg v1.0.2
go: downloading go.uber.org/atomic v1.7.0
go: downloading go.uber.org/multierr v1.6.0
go: downloading github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd
go: downloading github.com/modern-go/reflect2 v1.0.1
go: downloading github.com/klauspost/cpuid v1.3.1
go: downloading github.com/klauspost/cpuid/v2 v2.0.5
go: downloading github.com/rs/xid v1.2.1
go: downloading golang.org/x/image v0.0.0-20210220032944-ac19c3e999fb
go: downloading github.com/go-asn1-ber/asn1-ber v1.5.3
go: downloading github.com/philhofer/fwd v1.1.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
# github.com/mattn/go-sqlite3
sqlite3-binding.c: In function 'sqlite3SelectNew':
sqlite3-binding.c:128049:10: warning: function may return address of local variable [-Wreturn-local-addr]
128049 |   return pNew;
       |          ^~~~
sqlite3-binding.c:128009:10: note: declared here
128009 |   Select standin;
       |          ^~~~~~~
Removing intermediate container c72595613eee
 ---> 87f1859ec8e9
Step 3/18 : FROM node:alpine as nodebuild
alpine: Pulling from library/node
540db60ca938: Already exists 
fdd4ce4fd760: Pull complete 
b78962e1a5c8: Pull complete 
0040dd60b7a4: Pull complete 
Digest: sha256:f372a9ffcec27159dc9623bad29997a1b61eafbb145dbf4f7a64568be2f59b99
Status: Downloaded newer image for node:alpine
 ---> 48de5d16038c
Step 4/18 : RUN apk update &&     apk add ca-certificates git &&     git clone https://github.com/mattermost/focalboard &&     cd focalboard/webapp &&     npm install && npm run pack
 ---> Running in a0ee8e0b459b
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
v3.13.5-194-g1274644b64 [https://dl-cdn.alpinelinux.org/alpine/v3.13/main]
v3.13.5-187-g1477654ee3 [https://dl-cdn.alpinelinux.org/alpine/v3.13/community]
OK: 13890 distinct packages available
(1/7) Installing ca-certificates (20191127-r5)
(2/7) Installing brotli-libs (1.0.9-r3)
(3/7) Installing nghttp2-libs (1.42.0-r1)
(4/7) Installing libcurl (7.77.0-r1)
(5/7) Installing expat (2.2.10-r1)
(6/7) Installing pcre2 (10.36-r0)
(7/7) Installing git (2.30.2-r0)
Executing busybox-1.32.1-r6.trigger
Executing ca-certificates-20191127-r5.trigger
OK: 20 MiB in 23 packages
Cloning into 'focalboard'...
npm notice 
npm notice New minor version of npm available! 7.15.1 -> 7.17.0
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.17.0>
npm notice Run `npm install -g npm@7.17.0` to update!
npm notice 
npm ERR! code 1
npm ERR! path /focalboard/webapp/node_modules/gifsicle
npm ERR! command failed
npm ERR! command sh -c node lib/install.js
npm ERR! ⚠ spawn /focalboard/webapp/node_modules/gifsicle/vendor/gifsicle ENOENT
npm ERR!   ⚠ gifsicle pre-build test failed
npm ERR!   ℹ compiling from source
npm ERR!   ✖ Error: Command failed: /bin/sh -c autoreconf -ivf
npm ERR! /bin/sh: autoreconf: not found
npm ERR! 
npm ERR! 
npm ERR!     at /focalboard/webapp/node_modules/bin-build/node_modules/execa/index.js:231:11
npm ERR!     at processTicksAndRejections (node:internal/process/task_queues:96:5)
npm ERR!     at async Promise.all (index 0)

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-06-14T01_16_47_480Z-debug.log
The command '/bin/sh -c apk update &&     apk add ca-certificates git &&     git clone https://github.com/mattermost/focalboard &&     cd focalboard/webapp &&     npm install && npm run pack' returned a non-zero code: 1

Platform:

$ uname --all
Linux [REDACTED] 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux

Additional context: Running on a clean install of Debian 10 (Buster) on a VPS.

The associated CI job for 1cc2337 is failing on Docker build also, further confirming this bug report.

jmcph4 commented 3 years ago

Likely fixed by #552.

gabrielctn commented 3 years ago

I mentioned the same issue in #509 Didn't test the potential fix proposed by #552

jmcph4 commented 3 years ago

@gabrielctn Yeah I didn't see #509 prior to filing this bug report. Seems like a duplicate.