-
Notifications
You must be signed in to change notification settings - Fork 3
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
Create a Docker image for netpkg-tool #47
Comments
This sounds like a good idea! I'm not very familiar with Docker, so a PR would be great. |
Separate README file so that this one gets shown in Docker Hub. For phil-harmoniq#47
Separate README file so that this one gets shown in Docker Hub. For phil-harmoniq#47
Pull Request #50 was merged into the development branch. I'm going to keep this issue open until the changes are merged into the master branch. Docker is pretty cool, thanks for the PR! I'm going to be working on getting this and a couple of other small changes into the next version over the next couple of days. I'm sure I'll have more questions as I dig deeper into Docker, but one thing I noticed is that you copied |
I finally merged the changes into the master branch and automated Docker images are now available @philippgille. 😄 However, I can't seem to figure out why Docker Hub is using the main |
Thanks for merging @phil-harmoniq! Couple of things:
|
@philippgille, I've been trying to figure out what's going on but I'm completely stumped. So, I do have automated builds set up with Docker Cloud (they happen when pushes happen to either the develop or master branch), but Docker Hub doesn't show it as an automated build. As a test, I tried to make a repo directly in Docker Hub (instead of Docker Cloud) because it was able to tag the repo as an automated build, but now the Dockerfile fails when attempting the first copy (netpkg-tool.csproj). I can't seem to find any helpful issues in the Docker Github issues page. Building works locally and through Docker Cloud, but neither of them seem to actually tag the repo as an automated build. For reference, here is one of the logs with the copy error. Building locally works just fine, so I'm not sure what's going wrong. |
Ah I see. You forgot to add the log of the copy error, but I guess it's something like this: When I set up a Docker Hub build for my project about 2 month ago and used multi-stage builds for the first time, I had the same issue. Back then I found a post on the Docker forums where a Docker employee said they would update Docker Hub to a newer Docker version in July, because they were using a Docker version older than 17.05, which introduced multi-stage builds. That's why I used Docker Cloud as well. And instead of removing the automatic Docker Hub build, I just turned the automatic builds off, like this: That way, the image still shows up as automated build in Docker Hub. Because they said they're going to update in July, I thought they had done so and you could use Docker Hub for the multi-stage build. There's a Docker issue for this: docker/hub-feedback#1039 |
- Removed *pull* section, because `docker run` implies `docker pull` - Added links to Dockerfiles, just like most Docker image descriptions on the Docker Hub have - Fixed repository in example commands See phil-harmoniq#47 (comment)
Thanks for the readme pull request. Yea that was exactly the error. Thanks so much for your help! Automated builds are now working properly. The only thing left is Docker Hub still using the root Edit: Unfortunately, it seems that build logs aren't showing up on Docker Hub using this method. |
Regarding the build logs: Sooner or later Docker Hub will be updated to a Docker version that supports multi-stage builds. When that happens you can switch from building the images on Docker Cloud to Docker Hub and everything should be fine. Regarding the README: |
Some people might want to use the tool, but don't want to install all the requirements (.NET Core SDK, FUSE for appimagetool). Docker containers are perfect for that - they contain all dependencies and after usage they can be thrown away.
Usage would be something like this (on a machine with only git and Docker installed):
git clone https://github.com/phil-harmoniq/aspnet-src
docker run --rm -v ${PWD}/aspnet-src:/root/src -v ${PWD}/aspnet-out:/root/out phil-harmoniq/netpkg-tool netpkg-tool /root/src /root/out -n aspnet-pkg
./aspnet-out/aspnet-pkg
The Docker image should probably be based on the official microsoft/dotnet Docker image (tag
2.0-sdk
), but normal appimagetool usage depends on FUSE, which doesn't work in Docker containers, see this AppImage wiki page and the AppImage wiki page I wrote regarding packaging .NET Core apps. So the following is probably required:libglib2.0-0
needs to be installed in the Docker image so unpacking the appimagetool worksI've done something similar for philippgille/hello-netcoreapp, so I know how to do this and I would like to create a PR if you think this would be a nice feature.
The text was updated successfully, but these errors were encountered: