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

Add Docker build instructions #41

Closed
timlehr opened this issue Dec 29, 2020 · 3 comments
Closed

Add Docker build instructions #41

timlehr opened this issue Dec 29, 2020 · 3 comments
Assignees

Comments

@timlehr
Copy link

timlehr commented Dec 29, 2020

Hi @hufman,

I'd like to contribute to the API by adding some additional parsers and fixing some stuff, as I need those changes for my own project. I am trying to get the docker images of my code build using docker-build.sh script, but it doesn't succeed as the requirements image isn't found correctly. Can you update the development instructions to include docker?

Thank you!

@hufman hufman self-assigned this Dec 30, 2020
@hufman
Copy link
Owner

hufman commented Dec 30, 2020

Good catch! The Dockerfile.reqs file builds a Docker image with the requirements, based on the hash of the requirements.txt file, and the Dockerfile.app builds on top of this image. docker-build.sh should handle building the reqs Docker image and edits the Dockerfile.app file to point to the new Docker image's ID.
Is there an error in one of the steps? Check your local Docker's image list to see if a vgmdb_reqs image has been tagged, and feel free to edit Dockerfile.app to try to build it manually. It's entirely conceivable that something in the Docker ecosystem has changed in the last 5 years and the build scripts need updating. My build VM is running Debian LXC-Docker 1.9.1, as a singular data point, so the build scripts probably do need updating.

@timlehr
Copy link
Author

timlehr commented Dec 30, 2020

Thanks for the explanation! I am a total docker noob, so I am not quite sure what's wrong. I am trying to build the docker image locally on my macOS machine, so I am thinking that there might be some compatibility issues (Docker version 20.10.0, build 7287ab3).

It seems like the script builds it to a temp container - how can I actually check if the requirements succeeded? docker images doesnt list the image. There also seems to be an issue with the docker commit syntax which I suspect might be the culprit based on your description. Here are the relevant log entries:

** docker commit --run={"Cmd":["/sbin/my_init"],"PortSpecs":["80"],"Env":["HOME=/root="]} 7a443b2e0958625aa485e75c09546f23734c1258ac930152b10c872cdae8a0f2 vgmdb_reqs:926e1b
unknown flag: --run
See 'docker commit --help'.
sed: 1: "/Users/Tim/Documents/Gi ...": invalid command code T
given is experimental at docker/docker-compile.pl line 47.
when is experimental at docker/docker-compile.pl line 49.
when is experimental at docker/docker-compile.pl line 50.
when is experimental at docker/docker-compile.pl line 51.
given is experimental at docker/docker-compile.pl line 65.
when is experimental at docker/docker-compile.pl line 66.
when is experimental at docker/docker-compile.pl line 71.
when is experimental at docker/docker-compile.pl line 76.
when is experimental at docker/docker-compile.pl line 92.
when is experimental at docker/docker-compile.pl line 93.
when is experimental at docker/docker-compile.pl line 94.
when is experimental at docker/docker-compile.pl line 95.
when is experimental at docker/docker-compile.pl line 96.
when is experimental at docker/docker-compile.pl line 97.
when is experimental at docker/docker-compile.pl line 98.
when is experimental at docker/docker-compile.pl line 103.
*** docker run --cidfile=/var/folders/m4/nthrh4hx4kb532x0k5yy44xh0000gp/T/jwlQZ98JfJ/CID -v /var/folders/m4/nthrh4hx4kb532x0k5yy44xh0000gp/T/jwlQZ98JfJ:/.data vgmdb_reqs:36a64e /.data/setup.sh
Unable to find image 'vgmdb_reqs:36a64e' locally
docker: Error response from daemon: pull access denied for vgmdb_reqs, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Died at docker/docker-compile.pl line 118.

@hufman hufman closed this as completed in 8faa6ca Dec 30, 2020
@hufman
Copy link
Owner

hufman commented Dec 30, 2020

I've fixed up this build script, check it out!

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