toxuin / mdns-tunneller

Tunnels two (or more) mDNS domains together
Other
117 stars 9 forks source link

Docker Image Broken #3

Closed mikesmitty closed 3 years ago

mikesmitty commented 3 years ago

Looks like the tailing dev section on the Dockerfile is breaking the build. After removing that section the container builds and runs fine.

$ docker run -it --name=mdns -v $HOME/mdns-tunneller.yaml:/app/config/local.yml --net=host toxuin/mdns-tunneller:latest
npm notice 
npm notice New minor version of npm available! 7.5.3 -> 7.6.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v7.6.0
npm notice Run npm install -g npm@7.6.0 to update!
npm notice 
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /app/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-03-01T00_29_58_874Z-debug.log
$ docker run -it --name=mdns -v $HOME/mdns-tunneller.yaml:/app/config/local.yml --net=host toxuin/mdns-tunneller:latest /bin/sh
/app # ls -la
total 12
drwxr-xr-x    1 root     root          4096 Mar  1 00:32 .
drwxr-xr-x    1 root     root          4096 Mar  1 00:32 ..
drwxr-xr-x    2 root     root          4096 Mar  1 00:32 config
/app # 
toxuin commented 3 years ago

Thanks for pointing this out! I clearly messed up the build action. Will fix later tonight.

toxuin commented 3 years ago

@mikesmitty I believe this should be fixed with the latest commit.

Mdns-tunneller uses Docker's multistage builds. There is no need to delete the dev section, but rather specify the prod target: docker build --target prod -t mdns-tunneller . I've fixed the github workflow file so the :latest should have the prod target now.