Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile and dependency? #1

Open
DeAlexPesh opened this issue Aug 22, 2018 · 5 comments
Open

Dockerfile and dependency? #1

DeAlexPesh opened this issue Aug 22, 2018 · 5 comments

Comments

@DeAlexPesh
Copy link

DeAlexPesh commented Aug 22, 2018

Hi,
how I can make worked Dockerfile for build filebrowser?
Now I make this:

sudo mkdir -p /app/filebrowser && \
sudo touch /app/filebrowser/database.db && \
sudo bash -c 'cat <<EOT > /app/filebrowser/config.json
{
  "port": 80,
  "noAuth": false,
  "baseURL": "",
  "address": "",
  "database": "/etc/database.db",
  "plugin": "",
  "scope": "/FILES",
  "allowCommands": true,
  "allowEdit": true,
  "allowNew": true,
  "commands": []
}
EOT'

sudo mkdir -p /app/images/filebrowser && cd /app/images/filebrowser && \
sudo git clone https://github.com/filebrowser/filebrowser && \
sudo git clone https://github.com/filebrowser/frontend

sudo cp -rf /app/filebrowser/config.json /app/images/filebrowser/filebrowser/Docker.json && \
sudo mv /app/images/filebrowser/filebrowser/Dockerfile /app/images/filebrowser/Dockerfile && \
sudo bash -c 'cat /dev/null > /app/images/filebrowser/Dockerfile' && \
sudo nano /app/images/filebrowser/Dockerfile

Dockerfile

FROM golang:alpine

ARG DPURL=https://api.github.com/repos/golang/dep/releases/latest

RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories \
 && sed -i -e 's/v[0-9]\.[0-9]/edge/g' /etc/apk/repositories \
 && apk add -U --no-cache yarn git curl

COPY ./filebrowser /go/src/github.com/filebrowser/filebrowser
COPY ./frontend /go/src/github.com/filebrowser/frontend

WORKDIR /go/src/github.com/filebrowser/frontend
RUN yarn install; yarn build; exit 0

WORKDIR /go/src/github.com/filebrowser/filebrowser
RUN go get github.com/GeertJohan/go.rice/rice \
 && mkdir -p node_modules/filebrowser-frontend \
 && cp -rf /go/src/github.com/filebrowser/frontend/dist node_modules/filebrowser-frontend \
 && rice embed-go

RUN curl -fsSL "$(curl -s "${DPURL}" \
  | grep -i 'browser_download_url.*linux-amd64"' \
  | cut -d '"' -f 4)" -o /usr/local/bin/dep \
 && chmod +x /usr/local/bin/dep
RUN dep ensure -vendor-only

WORKDIR /go/src/github.com/filebrowser/filebrowser/cmd/filebrowser
RUN CGO_ENABLED=0 go build -a
RUN mv filebrowser /go/bin/filebrowser

FROM scratch
COPY --from=0 /go/bin/filebrowser /filebrowser
COPY --from=0 /go/src/github.com/filebrowser/filebrowser/Docker.json /config.json

VOLUME /tmp
VOLUME /srv
EXPOSE 80

ENTRYPOINT ["/filebrowser", "--config", "/config.json"]

docker-composer

sudo bash -c 'cat <<EOT > /app/compose/filebrowser.yml
version: "3"
services:
 filebrowser:
  build: /app/images/filebrowser
  image: images/filebrowser:scratch
  container_name: "filebrowser"
  ports:
   - "9001:80"
  volumes:
   - "/:/FILES"
   - "/app/filebrowser/config.json:/config.json"
   - "/app/filebrowser/database.db:/etc/database.db"
  environment:
   USER_ID: 1000
   GROUP_ID: 1000
  network_mode: bridge
  logging:
   driver: "json-file"
   options:
    max-size: "200k"
    max-file: "5"
  restart: "no"
EOT' && \
docker-compose -f /app/compose/filebrowser.yml config
docker-compose -p filebrowser -f /app/compose/filebrowser.yml up -d

Result:

Building filebrowser
Step 1/21 : FROM golang:alpine
 ---> 34d3217973fd
Step 2/21 : ARG DPURL=https://api.github.com/repos/golang/dep/releases/latest
 ---> Running in e55ba27c9bc1
Removing intermediate container e55ba27c9bc1
 ---> f0489380b34e
Step 3/21 : RUN echo 'http://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories  && sed -i -e 's/v[0-9]\.[0-9]/edge/g' /etc/apk/repositories  && apk add -U --no-cache yarn git curl
 ---> Running in 05b3076b35b4
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
(1/16) Installing nghttp2-libs (1.32.0-r0)
(2/16) Installing libssh2 (1.8.0-r3)
(3/16) Installing libcurl (7.61.0-r0)
(4/16) Installing curl (7.61.0-r0)
(5/16) Installing expat (2.2.5-r0)
(6/16) Installing pcre2 (10.31-r0)
(7/16) Installing git (2.18.0-r0)
(8/16) Installing c-ares (1.14.0-r0)
(9/16) Installing libcrypto1.0 (1.0.2p-r0)
(10/16) Installing libgcc (6.4.0-r8)
(11/16) Installing http-parser (2.8.1-r0)
(12/16) Installing libssl1.0 (1.0.2p-r0)
(13/16) Installing libstdc++ (6.4.0-r8)
(14/16) Installing libuv (1.22.0-r0)
(15/16) Installing nodejs (8.11.4-r0)
(16/16) Installing yarn (1.9.4-r0)
Executing busybox-1.28.4-r0.trigger
OK: 49 MiB in 30 packages
Removing intermediate container 05b3076b35b4
 ---> 43e411b60354
Step 4/21 : COPY ./filebrowser /go/src/github.com/filebrowser/filebrowser
 ---> 15c4945f35fd
Step 5/21 : COPY ./frontend /go/src/github.com/filebrowser/frontend
 ---> 3b3fca6ff5c7
Step 6/21 : WORKDIR /go/src/github.com/filebrowser/frontend
Removing intermediate container 67fdeed47770
 ---> 98c6d151668a
Step 7/21 : RUN yarn install; yarn build; exit 0
 ---> Running in 500ae0bae548
yarn install v1.9.4
info No lockfile found.
[1/4] Resolving packages...
-warning css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
-warning css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
-warning css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
-warning webpack-bundle-analyzer > bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
-warning " > url-loader@1.1.1" has incorrect peer dependency "webpack@^4.0.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 61.05s.
yarn run v1.9.4
$ node ./build/build.js
Total precache size is about 1.53 MB for 6 resources.
Hash: acc1abfb1d32a20944f6
Version: webpack 3.12.0
Time: 34164ms
                                              Asset       Size  Chunks                    Chunk Names
                       static/img/icons/favicon.ico    15.1 kB          [emitted]
              static/js/app.78abb6fa968cc91fdf0c.js     844 kB       0  [emitted]  [big]  app
static/css/app.91cd8ef5071f98059455a4174cb732ed.css     632 kB       0  [emitted]  [big]  app
          static/js/app.78abb6fa968cc91fdf0c.js.map    5.26 MB       0  [emitted]         app
     static/js/manifest.8642b1d6d76f4f56d3f7.js.map    9.27 kB       1  [emitted]         manifest
        static/img/icons/android-chrome-192x192.png    9.37 kB          [emitted]
        static/img/icons/android-chrome-512x512.png    23.1 kB          [emitted]
              static/img/icons/apple-touch-icon.png    7.42 kB          [emitted]
                 static/img/icons/browserconfig.xml  246 bytes          [emitted]
                 static/img/icons/favicon-16x16.png  843 bytes          [emitted]
                 static/img/icons/favicon-32x32.png    1.25 kB          [emitted]
         static/js/manifest.8642b1d6d76f4f56d3f7.js  871 bytes       1  [emitted]         manifest
                static/img/icons/mstile-144x144.png    7.21 kB          [emitted]
                static/img/icons/mstile-150x150.png    7.02 kB          [emitted]
                static/img/icons/mstile-310x150.png    7.64 kB          [emitted]
                static/img/icons/mstile-310x310.png    14.5 kB          [emitted]
                  static/img/icons/mstile-70x70.png       5 kB          [emitted]
             static/img/icons/safari-pinned-tab.svg    2.49 kB          [emitted]
                               static/manifest.json  480 bytes          [emitted]
                              static/share/404.html    1.83 kB          [emitted]
                            static/share/index.html       3 kB          [emitted]
                                         index.html    3.81 kB          [emitted]

  Build complete.

Done in 36.71s.
Removing intermediate container 500ae0bae548
 ---> 1d0c5a05616c
Step 8/21 : WORKDIR /go/src/github.com/filebrowser/filebrowser
Removing intermediate container 3a68b951b03e
 ---> 0adb426e7eed
Step 9/21 : RUN go get github.com/GeertJohan/go.rice/rice  && mkdir -p node_modules/filebrowser-frontend  && cp -rf /go/src/github.com/filebrowser/frontend/dist node_modules/filebrowser-frontend  && rice embed-go
 ---> Running in 15e9edc106d1
error reading package: no buildable Go source files in /go/src/github.com/filebrowser/filebrowser
ERROR: Service 'filebrowser' failed to build: The command '/bin/sh -c go get github.com/GeertJohan/go.rice/rice  && mkdir -p node_modules/filebrowser-frontend  && cp -rf /go/src/github.com/filebrowser/frontend/dist node_modules/filebrowser-frontend  && rice embed-go' returned a non-zero code: 1
@eine
Copy link
Contributor

eine commented Aug 22, 2018

The suggested approach is:

$ git clone --recurse-submodules https://github.com/filebrowser/filebrowser
$ cd filebrowser
$ USE_DOCKER="true" ./build/build_all.sh
# [Edit/replace Docker.json and/or Dockerfile, if you want]
$ docker build -t filebrowser/filebrowser .

The error no buildable Go source files.... is produced because you are executing rice embed-go in the root of the repo. This changed after filebrowser/filebrowser#506 was merged. You now need to execute it inside subdir lib.

See https://github.com/filebrowser/community/blob/master/development.md and https://github.com/filebrowser/community/blob/master/builds.md.

@DeAlexPesh
Copy link
Author

Thank you!

@DeAlexPesh
Copy link
Author

DeAlexPesh commented Nov 13, 2018

I make this, but no work:

sudo mkdir -p /app/images/filebrowser && cd /app/images/filebrowser && \
sudo git clone --recurse-submodules https://github.com/filebrowser/filebrowser

cd /app/images/filebrowser/filebrowser && \
sudo bash -c 'USE_DOCKER="true" ./build/build_all.sh'

sudo sed -i 's|ENTRYPOINT .*|ENTRYPOINT ["\/filebrowser", "--config", "\/config.json"]|' \
/app/images/filebrowser/filebrowser/Dockerfile

sudo bash -c 'cat <<EOT > /app/compose/filebrowser.yml
version: "3"
services:
 filebrowser:
  build: /app/images/filebrowser/filebrowser
  image: images/filebrowser:scratch
  container_name: "filebrowser"
  ports:
   - "9001:80"
  volumes:
   - "/:/FILES"
   - "/app/filebrowser/config.json:/config.json"
   - "/app/filebrowser/database.db:/etc/database.db"
  environment:
   USER_ID: 1000
   GROUP_ID: 1000
  network_mode: bridge
  logging:
   driver: "json-file"
   options:
    max-size: "200k"
    max-file: "5"
  restart: always
EOT' && \
docker-compose -f /app/compose/filebrowser.yml config
docker-compose -p filebrowser -f /app/compose/filebrowser.yml up -d

Output:

dos2unix: converting file build_assets.sh to Unix format...
dos2unix: converting file build.sh to Unix format...
yarn install v1.7.0
info No lockfile found.
[1/4] Resolving packages...
warning css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning eslint > file-entry-cache > flat-cache > circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
warning webpack-bundle-analyzer > bfj-node4@5.3.1: Switch to the `bfj` package for fixes and new features!
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "linux" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
warning Your current version of Yarn is out of date. The latest version is "1.12.3", while you're on "1.7.0".
info To upgrade, run the following command:
$ apk update && apk add -u yarn
Done in 71.84s.
yarn run v1.7.0
$ node ./build/build.js
⠴ building for production...Total precache size is about 1.51 MB for 6 resources.
Hash: e86192cfedcf58802de6
Version: webpack 3.12.0
Time: 57616ms
                                              Asset       Size  Chunks                    Chunk Names
                static/img/icons/mstile-144x144.png    7.21 kB          [emitted]
              static/js/app.caee61ffdf5642547fdc.js     823 kB       0  [emitted]  [big]  app
static/css/app.97bd0ed86d57796ebb51a8c42d40dee5.css     632 kB       0  [emitted]  [big]  app
          static/js/app.caee61ffdf5642547fdc.js.map    5.15 MB       0  [emitted]         app
     static/js/manifest.123220cb93b9d190f6f3.js.map    9.27 kB       1  [emitted]         manifest
        static/img/icons/android-chrome-192x192.png    9.37 kB          [emitted]
                 static/img/icons/favicon-16x16.png  843 bytes          [emitted]
                 static/img/icons/favicon-32x32.png    1.25 kB          [emitted]
                 static/img/icons/browserconfig.xml  246 bytes          [emitted]
        static/img/icons/android-chrome-512x512.png    23.1 kB          [emitted]
                static/img/icons/mstile-150x150.png    7.02 kB          [emitted]
         static/js/manifest.123220cb93b9d190f6f3.js  871 bytes       1  [emitted]         manifest
                static/img/icons/mstile-310x150.png    7.64 kB          [emitted]
                static/img/icons/mstile-310x310.png    14.5 kB          [emitted]
              static/img/icons/apple-touch-icon.png    7.42 kB          [emitted]
                  static/img/icons/mstile-70x70.png       5 kB          [emitted]
             static/img/icons/safari-pinned-tab.svg    2.49 kB          [emitted]
                       static/img/icons/favicon.ico    15.1 kB          [emitted]
                              static/share/404.html    1.83 kB          [emitted]
                               static/manifest.json  480 bytes          [emitted]
                            static/share/index.html       3 kB          [emitted]
                                         index.html    3.81 kB          [emitted]

  Build complete.


Done in 62.91s.
github.com/asdine/storm (download)
Fetching https://go.etcd.io/bbolt?go-get=1
Parsing meta tags from https://go.etcd.io/bbolt?go-get=1 (status code 200)
get "go.etcd.io/bbolt": found meta tag get.metaImport{Prefix:"go.etcd.io/bbolt", VCS:"git", RepoRoot:"https://github.com/etcd-io/bbolt"} at https://go.etcd.io/bbolt?go-get=1
go.etcd.io/bbolt (download)
github.com/kardianos/osext (download)
github.com/gohugoio/hugo (download)
github.com/BurntSushi/toml (download)
github.com/chaseadamsio/goorgeous (download)
github.com/russross/blackfriday (download)
github.com/shurcooL/sanitized_anchor_name (download)
github.com/mattn/go-isatty (download)
github.com/PuerkitoBio/purell (download)
github.com/PuerkitoBio/urlesc (download)
Fetching https://golang.org/x/net/idna?go-get=1
Parsing meta tags from https://golang.org/x/net/idna?go-get=1 (status code 200)
get "golang.org/x/net/idna": found meta tag get.metaImport{Prefix:"golang.org/x/net", VCS:"git", RepoRoot:"https://go.googlesource.com/net"} at https://golang.org/x/net/idna?go-get=1
get "golang.org/x/net/idna": verifying non-authoritative meta tag
Fetching https://golang.org/x/net?go-get=1
Parsing meta tags from https://golang.org/x/net?go-get=1 (status code 200)
golang.org/x/net (download)
Fetching https://golang.org/x/text/secure/bidirule?go-get=1
Parsing meta tags from https://golang.org/x/text/secure/bidirule?go-get=1 (status code 200)
get "golang.org/x/text/secure/bidirule": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/secure/bidirule?go-get=1
get "golang.org/x/text/secure/bidirule": verifying non-authoritative meta tag
Fetching https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
golang.org/x/text (download)
Fetching https://golang.org/x/text/transform?go-get=1
Parsing meta tags from https://golang.org/x/text/transform?go-get=1 (status code 200)
get "golang.org/x/text/transform": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/transform?go-get=1
get "golang.org/x/text/transform": verifying non-authoritative meta tag
Fetching https://golang.org/x/text/unicode/bidi?go-get=1
Parsing meta tags from https://golang.org/x/text/unicode/bidi?go-get=1 (status code 200)
get "golang.org/x/text/unicode/bidi": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/unicode/bidi?go-get=1
get "golang.org/x/text/unicode/bidi": verifying non-authoritative meta tag
Fetching https://golang.org/x/text/unicode/norm?go-get=1
Parsing meta tags from https://golang.org/x/text/unicode/norm?go-get=1 (status code 200)
get "golang.org/x/text/unicode/norm": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/unicode/norm?go-get=1
get "golang.org/x/text/unicode/norm": verifying non-authoritative meta tag
Fetching https://golang.org/x/text/width?go-get=1
Parsing meta tags from https://golang.org/x/text/width?go-get=1 (status code 200)
get "golang.org/x/text/width": found meta tag get.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/width?go-get=1
get "golang.org/x/text/width": verifying non-authoritative meta tag
github.com/alecthomas/chroma (download)
github.com/dlclark/regexp2 (download)
github.com/danwakefield/fnmatch (download)
github.com/spf13/cast (download)
github.com/spf13/viper (download)
github.com/fsnotify/fsnotify (download)
Fetching https://golang.org/x/sys/unix?go-get=1
Parsing meta tags from https://golang.org/x/sys/unix?go-get=1 (status code 200)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.org/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
github.com/hashicorp/hcl (download)
github.com/magiconair/properties (download)
github.com/mitchellh/mapstructure (download)
github.com/pelletier/go-toml (download)
github.com/spf13/afero (download)
github.com/spf13/jwalterweatherman (download)
github.com/spf13/pflag (download)
Fetching https://gopkg.in/yaml.v2?go-get=1
Parsing meta tags from https://gopkg.in/yaml.v2?go-get=1 (status code 200)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at https://gopkg.in/yaml.v2?go-get=1
gopkg.in/yaml.v2 (download)
github.com/hashicorp/go-immutable-radix (download)
github.com/hashicorp/golang-lru (download)
github.com/pkg/errors (download)
github.com/jdkato/prose (download)
github.com/kyokomi/emoji (download)
github.com/miekg/mmark (download)
github.com/olekukonko/tablewriter (download)
github.com/mattn/go-runewidth (download)
github.com/hacdias/fileutils (download)
github.com/maruel/natural (download)
github.com/mholt/caddy (download)
github.com/robfig/cron (download)
Fetching https://golang.org/x/crypto/bcrypt?go-get=1
Parsing meta tags from https://golang.org/x/crypto/bcrypt?go-get=1 (status code 200)
get "golang.org/x/crypto/bcrypt": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at https://golang.org/x/crypto/bcrypt?go-get=1
get "golang.org/x/crypto/bcrypt": verifying non-authoritative meta tag
Fetching https://golang.org/x/crypto?go-get=1
Parsing meta tags from https://golang.org/x/crypto?go-get=1 (status code 200)
golang.org/x/crypto (download)
github.com/dgrijalva/jwt-go (download)
github.com/gorilla/websocket (download)
github.com/mholt/archiver (download)
github.com/dsnet/compress (download)
github.com/golang/snappy (download)
github.com/nwaples/rardecode (download)
github.com/pierrec/lz4 (download)
github.com/ulikunitz/xz (download)
github.com/xi2/xz (download)
github.com/hacdias/varutils (download)
github.com/mitchellh/go-homedir (download)
github.com/spf13/cobra (download)
Fetching https://gopkg.in/natefinch/lumberjack.v2?go-get=1
Parsing meta tags from https://gopkg.in/natefinch/lumberjack.v2?go-get=1 (status code 200)
get "gopkg.in/natefinch/lumberjack.v2": found meta tag get.metaImport{Prefix:"gopkg.in/natefinch/lumberjack.v2", VCS:"git", RepoRoot:"https://gopkg.in/natefinch/lumberjack.v2"} at https://gopkg.in/natefinch/lumberjack.v2?go-get=1
gopkg.in/natefinch/lumberjack.v2 (download)
github.com/asdine/storm/codec
go.etcd.io/bbolt
github.com/asdine/storm/codec/json
github.com/asdine/storm/q
github.com/asdine/storm/internal
github.com/asdine/storm/index
github.com/kardianos/osext

github.com/asdine/storm
github.com/GeertJohan/go.rice
github.com/BurntSushi/toml
github.com/russross/blackfriday
github.com/shurcooL/sanitized_anchor_name
github.com/chaseadamsio/goorgeous
github.com/mattn/go-isatty
github.com/gohugoio/hugo/common/terminal
github.com/gohugoio/hugo/common/text
github.com/PuerkitoBio/urlesc
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
golang.org/x/text/secure/bidirule
golang.org/x/text/width
github.com/dlclark/regexp2/syntax
golang.org/x/net/idna
github.com/PuerkitoBio/purell
github.com/dlclark/regexp2
github.com/danwakefield/fnmatch
github.com/gohugoio/hugo/bufferpool
github.com/gohugoio/hugo/common/hugio
github.com/gohugoio/hugo/common/collections
github.com/gohugoio/hugo/common/math
github.com/alecthomas/chroma
github.com/spf13/cast
github.com/gohugoio/hugo/common/maps
github.com/alecthomas/chroma/formatters/html
github.com/alecthomas/chroma/lexers/internal
github.com/alecthomas/chroma/formatters
github.com/alecthomas/chroma/lexers/a
github.com/alecthomas/chroma/lexers/b
github.com/alecthomas/chroma/lexers/p
github.com/alecthomas/chroma/lexers/j
github.com/alecthomas/chroma/lexers/d
github.com/alecthomas/chroma/lexers/c
github.com/alecthomas/chroma/lexers/e
github.com/alecthomas/chroma/lexers/f
github.com/alecthomas/chroma/lexers/i
github.com/alecthomas/chroma/lexers/k
github.com/alecthomas/chroma/lexers/l
github.com/alecthomas/chroma/lexers/h
github.com/alecthomas/chroma/lexers/n
github.com/alecthomas/chroma/lexers/o
github.com/alecthomas/chroma/lexers/q
github.com/alecthomas/chroma/lexers/r
github.com/alecthomas/chroma/lexers/circular
github.com/alecthomas/chroma/lexers/g
github.com/alecthomas/chroma/lexers/m
github.com/alecthomas/chroma/lexers/s
github.com/alecthomas/chroma/lexers/t
github.com/alecthomas/chroma/lexers/v
github.com/alecthomas/chroma/lexers/w
github.com/alecthomas/chroma/lexers/x
github.com/alecthomas/chroma/lexers/y
github.com/alecthomas/chroma/styles
github.com/alecthomas/chroma/lexers
github.com/gohugoio/hugo/compare
golang.org/x/sys/unix
github.com/hashicorp/hcl/hcl/strconv
github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/hcl/ast
github.com/hashicorp/hcl/hcl/scanner
github.com/hashicorp/hcl/hcl/parser
github.com/fsnotify/fsnotify
github.com/hashicorp/hcl/json/token
github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/hcl/printer
github.com/hashicorp/hcl/json/parser
github.com/magiconair/properties
github.com/hashicorp/hcl
github.com/mitchellh/mapstructure
github.com/pelletier/go-toml
github.com/spf13/afero/mem
github.com/spf13/afero
github.com/spf13/jwalterweatherman
github.com/spf13/pflag
gopkg.in/yaml.v2
github.com/gohugoio/hugo/docshelper
github.com/hashicorp/golang-lru/simplelru
github.com/hashicorp/go-immutable-radix
github.com/pkg/errors
github.com/spf13/viper
github.com/jdkato/prose/internal/util
github.com/jdkato/prose/transform
github.com/kyokomi/emoji
github.com/gohugoio/hugo/config
github.com/miekg/mmark
github.com/gohugoio/hugo/hugofs
github.com/gohugoio/hugo/langs
github.com/gohugoio/hugo/hugolib/paths
github.com/gohugoio/hugo/hugolib/filesystems
github.com/mattn/go-runewidth
github.com/olekukonko/tablewriter
github.com/gohugoio/hugo/parser/pageparser
github.com/gohugoio/hugo/helpers
github.com/hacdias/fileutils
github.com/maruel/natural
github.com/mholt/caddy/vendor/github.com/flynn/go-shlex
github.com/mholt/caddy/vendor/github.com/google/uuid
github.com/mholt/caddy/telemetry
github.com/mholt/caddy/caddyfile
github.com/gohugoio/hugo/common/herrors
github.com/gohugoio/hugo/parser/metadecoders
github.com/mholt/caddy
github.com/gohugoio/hugo/parser
github.com/robfig/cron
golang.org/x/crypto/blowfish
github.com/dgrijalva/jwt-go
golang.org/x/crypto/bcrypt
github.com/filebrowser/filebrowser/lib
github.com/dgrijalva/jwt-go/request
github.com/gorilla/websocket
# github.com/filebrowser/filebrowser/lib
../lib/file.go:195:15: undefined: parser.ReadFrom
github.com/dsnet/compress/bzip2/internal/sais
github.com/dsnet/compress/internal
github.com/dsnet/compress/internal/errors
github.com/golang/snappy
github.com/dsnet/compress
github.com/dsnet/compress/internal/prefix
github.com/nwaples/rardecode
github.com/dsnet/compress/bzip2
github.com/pierrec/lz4/internal/xxh32
github.com/pierrec/lz4
github.com/ulikunitz/xz/internal/xlog
github.com/ulikunitz/xz/internal/hash
github.com/xi2/xz
github.com/ulikunitz/xz/lzma
github.com/hacdias/varutils
github.com/mitchellh/go-homedir
github.com/spf13/cobra
github.com/ulikunitz/xz
github.com/mholt/archiver
gopkg.in/natefinch/lumberjack.v2
filebrowser-tmp


Building filebrowser
Step 1/8 : FROM scratch
 --->
Step 2/8 : COPY --from=filebrowser/dev /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
 ---> Using cache
 ---> b9f7fb328150
Step 3/8 : VOLUME /tmp
 ---> Using cache
 ---> 43c66f5f0866
Step 4/8 : VOLUME /srv
 ---> Using cache
 ---> f3c65dbcc46d
Step 5/8 : EXPOSE 80
 ---> Using cache
 ---> 5dfbffc74c67
Step 6/8 : COPY filebrowser /filebrowser
ERROR: Service 'filebrowser' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder221071234/filebrowser: no such file or directory

@eine
Copy link
Contributor

eine commented Nov 19, 2018

After the backend is built, the binary should be copied from subdir cli to the root of the repo. See https://github.com/filebrowser/filebrowser/blob/master/build/build_all.sh#L44. Then, the container is removed. Please, check if the binary exists either in the root or in subdir cli.

@DeAlexPesh
Copy link
Author

I use official

sudo mkdir -p /app/images/filebrowser && cd /app/images/filebrowser
sudo git clone --recurse-submodules https://github.com/filebrowser/filebrowser
cd /app/images/filebrowser/filebrowser
sudo bash -c 'USE_DOCKER="true" ./build/build_all.sh'

and official Dockerfile, but:

Building filebrowser
Step 1/8 : FROM scratch
 --->
Step 2/8 : COPY --from=filebrowser/dev /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
 ---> 11689ab36c54
Step 3/8 : VOLUME /tmp
 ---> Running in ef0070feb839
Removing intermediate container ef0070feb839
 ---> cf5d1914e9bf
Step 4/8 : VOLUME /srv
 ---> Running in 0a32c740340a
Removing intermediate container 0a32c740340a
 ---> 681365cabb50
Step 5/8 : EXPOSE 80
 ---> Running in b8d1c0dada6f
Removing intermediate container b8d1c0dada6f
 ---> 015be8f4cc0b
Step 6/8 : COPY filebrowser /filebrowser
ERROR: Service 'filebrowser' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder280383416/filebrowser: no such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants