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

Docker build for alpine image not working due to missing json file #2484

Closed
vsalmendra opened this issue May 31, 2023 · 3 comments · Fixed by #2486
Closed

Docker build for alpine image not working due to missing json file #2484

vsalmendra opened this issue May 31, 2023 · 3 comments · Fixed by #2486
Labels

Comments

@vsalmendra
Copy link
Contributor

Description

Docker build using the Dockerfile (alpine image) fails on clean repo build

Expected behaviour

Docker image should be created

What is happening instead?

Image creation failing due to missing file:

 2023-05-31 18:22:30 ⌚  LAPTOP-VA in ~/code/filebrowser/filebrowser
± |master ✓| → git log -2
commit 6744cd47cef87e3a76a2190bdf123b6c2197fe6f (HEAD -> master, origin/master, origin/HEAD)
Author: ULiiAn <yncxcxz@126.com>
Date:   Mon May 1 19:09:44 2023 +0800

    fix: video preview click next or prev button subtitles not update (#2423)

commit a4ef02a47b53742a0ac1f639563b0c67116619c8
Author: Yeicor <4929005+Yeicor@users.noreply.github.com>
Date:   Mon May 1 13:07:01 2023 +0200

    feat: add option to copy download links from shares (#2442)

 2023-05-31 18:23:13 ⌚  LAPTOP-VA in ~/code/filebrowser/filebrowser
± |master ✓| → go build

 2023-05-31 18:23:29 ⌚  LAPTOP-VA in ~/code/filebrowser/filebrowser
± |master ✓| → docker build . -t filebrowser:vsalmendra
[+] Building 0.9s (7/8)                                                                                                                                                                                     
 => [internal] load .dockerignore                                                                                                                                                                      0.1s
 => => transferring context: 64B                                                                                                                                                                       0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
 => => transferring dockerfile: 389B                                                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                                       0.7s
 => [1/4] FROM docker.io/library/alpine:latest@sha256:02bb6f428431fbc2809c5d1b41eab5a68350194fb508869a33cb1af4444c9b11                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                      0.2s
 => => transferring context: 19.29MB                                                                                                                                                                   0.1s
 => CACHED [2/4] RUN apk --update add ca-certificates                      mailcap                      curl                                                                                           0.0s
 => ERROR [3/4] COPY docker_config.json /.filebrowser.json                                                                                                                                             0.0s
------
 > [3/4] COPY docker_config.json /.filebrowser.json:
------
Dockerfile:12
--------------------
  10 |     EXPOSE 80
  11 |     
  12 | >>> COPY docker_config.json /.filebrowser.json
  13 |     COPY filebrowser /filebrowser
  14 |     
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::i6owshny7wqw4u83v17z3pq7o: "/docker_config.json": not found

How to reproduce?

  1. git clone....
  2. go build
  3. docker build .
@vsalmendra
Copy link
Contributor Author

I think the problem appeared because the commit 46d8046 seems to have missed the .dockerignore file, which was also changed by b8f35ce, which was partially reverted by the commit above. The problem arises because docker_config.json started to be excluded by b8f35ce, but was not "un-ignored" by 46d8046.

vsalmendra added a commit to vsalmendra/filebrowser that referenced this issue May 31, 2023
Commit b8f35ce excluded `docker_config.json` of docker build and this was not
reverted by 46d8046

Fixes filebrowser#2484
vsalmendra added a commit to vsalmendra/filebrowser that referenced this issue May 31, 2023
Commit b8f35ce excluded `docker_config.json` of docker build and this was not
reverted by 46d8046

Fixes filebrowser#2484
vsalmendra added a commit to vsalmendra/filebrowser that referenced this issue May 31, 2023
Commit b8f35ce excluded `docker_config.json` by changing .dockerignore rules
and this was not reverted by 46d8046. This commit adds the exception
back.

Fixes filebrowser#2484
@github-actions
Copy link

github-actions bot commented Jul 1, 2023

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jul 1, 2023
@github-actions
Copy link

github-actions bot commented Jul 7, 2023

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant