visulate/visulate-ora2pg

Unable to build the docker image

bala-office opened this issue · 13 comments

When I am trying to build the docker image with the default dockerfile, I am getting the following error message

"cannot replace to directory /var/lib/docker/overlay2/m4we45daot75b1nye3tt7p9yb/merged/var/lock with file"

Have you seen this issue ?

This is the command I tried to run:
docker build -t visulate-ora2pg:latest .

I haven't seen that error. Lets try a few things see if we can narrow it down.

  1. Are you able to run the pre-built image from docker hub?
mkdir ora2pg-projects
docker run -d -p 3000:3000 -v "$(pwd)/ora2pg-projects":/project visulate/visulate-ora2pg:latest
  1. It could be a problem with your /var/lib/docker/overlay2/ setup. Can you build docker images from other projects e.g. the Dockerhub sample app?
  2. Are you able to build from the dockerhub-release-maintenance branch?

Yes I am able to run the published image of visulate-ora2pg. But not able to build the docker image locally with the Dockerfile. I am able to build other docker images though.

Are you able to build the version on the maintenance branch? It is substantially different to the one on main.

@bala-office were you able to build the maintenance branch image? That is the Dockerfile that I used to build the image that's posted to dockerhub. Its probably the easiest one to work with if you are looking to make a simple change

The main branch is a work in progress that integrates with Google Cloud Endpoints to implement OAuth authentication for the API and UI. It is not fully documented. I have some notes on how build and run it if you are interested

@pgoldtho I haven't tried the maintenance branch yet. Will try with that and update here.

Tried dockerhub-release-maintenance branch. Still unable to build the docker image.

@dilansalinda what error are you getting?

Here is the error log @pgoldtho

cannot replace to directory /var/lib/docker/overlay2/xx49n1lh7s6jje7lzqdkxwmep/merged/var/lock with file
dilansalinda@mylap visulate-ora2pg % docker build -t visulate-ora2pg:latest .
[+] Building 11.3s (12/18)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 838B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 74B 0.0s
=> [internal] load metadata for docker.io/georgmoser/ora2pg:latest 3.2s
=> [internal] load metadata for docker.io/library/node:current-alpine 3.2s
=> [auth] library/node:pull token for registry-1.docker.io 0.0s
=> [auth] georgmoser/ora2pg:pull token for registry-1.docker.io 0.0s
=> CACHED [ora2pg 1/1] FROM docker.io/georgmoser/ora2pg:latest@sha256:30e8c05670a0c589989bf86f1a4564f1b83f8c7924be0d4316adf1211f4c81e5 0.0s
=> [internal] load build context 1.2s
=> => transferring context: 1.16MB 0.8s
=> CACHED [vue-ui 1/3] FROM docker.io/library/node:current-alpine@sha256:4522cc108ad7c055b71f545596bfc07632d9f9a41125ea12eabe8f04114807f3 0.0s
=> ERROR [stage-2 2/8] COPY --from=ora2pg / . 7.9s
=> CACHED [vue-ui 2/3] COPY /ui /ui/dist 0.0s
=> CACHED [vue-ui 3/3] WORKDIR /ui 0.0s


[stage-2 2/8] COPY --from=ora2pg / .:


cannot replace to directory /var/lib/docker/overlay2/uh6a4rqw8snvhevm2ia3vcemb/merged/var/lock with file

Wasn't able to reproduce the issue on either branch using:

docker build --no-cache  -t visulate-ora2pg:latest . 

Have you made any changes to the Dockerfile? It looks like its pulling georgmoser/ora2pg:latest instead of georgmoser/ora2pg:21.0. That shouldn't be an issue (it worked when I tried it) but makes me wonder if there are other changes.

Cannot reproduce. Closing

Was able to reproduce on a Mac. Build runs cleanly on linux

Problem occurs when attempting to overwrite files or directories that include symlinks.

Re-write Dockerfile to add nodejs to the georgmoser/ora2pg image instead of copying ora2pg artifacts on to a node:alpine image

Fixed in latest build. Tested on Ubuntu 20.04 and macOS Monterey