Skip to content
This repository was archived by the owner on May 31, 2019. It is now read-only.

Conversation

@glennc
Copy link
Member

@glennc glennc commented Jan 30, 2017

This mostly copies the current state of the dotnet-docker repo, and probably should evolve in the same way.

build.sh Outdated
set -o pipefail # Carry failures over pipes

repo_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker_repo="microsoft/aspnetcore"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to also account for files that are on the microsoft/aspnetcore-build repo instead.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because this doesn't actually push to dockerhub it doesn't matter. You just need some name to refer to the images that are built to test them.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, could we use something different, like 'test/aspnetcore'?

build.sh Outdated
done
}

build_dockerfiles "$( find . -path './.*' -prune -o -name 'Dockerfile' -a -path '**/*' -print0 | xargs -0 -n1 dirname )" No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: consider adding trailing end-line to all files.

dotnet restore
dotnet publish -o publish/self-contained
else
sed -i '/<PropertyGroup>/a \ <RuntimeIdentifiers>debian.8-x64<\/RuntimeIdentifiers>' ./${PWD##*/}.csproj
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to edit the file. This can be based on command line as dotnet restore /p:RuntimeIdentifiers=debian.8-x64. Or, we can just add it to the file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RIght, i didn't realize this was an option with the new CLI. So if a csproj doesn't specify the RID as long as I have restored specifying the RID I can also publish for a specific RID and it will be standalone?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

test/test.sh Outdated
set -e # Exit immediately upon failure
set -o pipefail # Carry failures over pipes

docker_repo="microsoft/aspnetcore"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

microsoft/aspnetcore-build

@@ -0,0 +1,29 @@
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@friism recently made a contribution to the dotnet-docker repo last week which changed this pattern to use a Dockerfile instead. This removed the host dependency which allows the tests to be run against a remote daemon.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my I have looked at his PR and intent to do the same here. But I already had enough of this done that it seemed worthwhile to do a PR and then change it instead of waiting. More coverage sooner seemed like a good idea.

RUN chmod +x /packagescache/build-cache.sh \
&& /packagescache/build-cache.sh https://dist.asp.net/packagecache/1.1.0/aspnetcore.packagecache-1.1.0-legacy-debian.8-x64.tar.gz \
RUN chmod +x /packagescache/build-cache.sh
RUN /packagescache/build-cache.sh https://dist.asp.net/packagecache/1.1.0/aspnetcore.packagecache-1.1.0-legacy-debian.8-x64.tar.gz \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change? (did you intend to check this in?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC this was changed because Glenn hit moby/moby#9547

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the issue Nate linked is the reason. Presumably we don't have to chmod inside the container at all, and I had intended to look at removing it completely if it was possible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry

@natemcmaster
Copy link
Contributor

Btw, travis is enabled now. Try pushing and empty commit to trigger a run.

@natemcmaster
Copy link
Contributor

Tentative :shipit:. ⌚ to merge until this actually passes on travis CI.

@natemcmaster
Copy link
Contributor

CI Passed 🎆 Squash and :shipit:

@glennc glennc merged commit 2b1fde5 into aspnet:master Jan 31, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

5 participants