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

added beta 7 coreclr dockerfile #84

Merged
merged 7 commits into from
Sep 14, 2015
Merged

Conversation

jchannon
Copy link
Contributor

@jchannon jchannon commented Sep 3, 2015

This PR provides a beta 7 coreclr dockerfile

This addresses #83

@akoeplinger
Copy link

You'll also need these packages (per docs):

libunwind8, gettext, libssl-dev, libcurl3-dev, zlib1g

@jchannon
Copy link
Contributor Author

jchannon commented Sep 3, 2015

@akoeplinger cheers, added them in, docker build worked locally however before adding them in

@akoeplinger
Copy link

@jchannon sure, cause that doesn't try to run any apps ;) dnu restore needs libcurl e.g.

@jchannon
Copy link
Contributor Author

jchannon commented Sep 3, 2015

gotcha, damn it failed build

@akoeplinger
Copy link

@jchannon

E: Unable to locate package libunwind8

That package is only available starting from Debian Jessie, you should switch to that from wheezy.

@jchannon
Copy link
Contributor Author

jchannon commented Sep 3, 2015

Failed again

@akoeplinger
Copy link

[CI] Sample 'HelloWeb' not found for Docker image '1.0.0-beta7-coreclr' .ci/run-with-all-tags.sh . HelloWeb returned exit code 1

I think the CI script needs to be modified to strip off the -coreclr at the end here.

@jchannon
Copy link
Contributor Author

jchannon commented Sep 3, 2015

Is it taking it from my new folder name I wonder

On Thursday, 3 September 2015, Alexander Köplinger [email protected]
wrote:

[CI] Sample 'HelloWeb' not found for Docker image '1.0.0-beta7-coreclr'
.ci/run-with-all-tags.sh . HelloWeb returned exit code 1

I think the CI script needs to be modified to strip off the -coreclr at
the end here

if [[ ! -d $SAMPLES_REPO/samples/$VERSION/$TEST_APP ]]; then

.


Reply to this email directly or view it on GitHub
#84 (comment).

@akoeplinger
Copy link

Yes it does, it gets all tags (== folders) here and passes it down here

@jchannon
Copy link
Contributor Author

jchannon commented Sep 3, 2015

I've stripped it but i'm not sure thats correct as I think we'll need a tag for coreclr. Happy to undo last commit and then take advice on path forward from MS team

@akoeplinger
Copy link

I think you just need to just strip it at build-app-image.sh#L18 otherwise it'd take the same 1.0.0-beta7 image twice.

@jchannon
Copy link
Contributor Author

jchannon commented Sep 3, 2015

Same in build-all-tags too though

@akoeplinger
Copy link

No, in that case we want it to be 1.0.0-beta7-coreclr. We don't want it in build-app-image.sh as there's no folder called -coreclr in aspnet/home samples where is tries to run the tests.

@jchannon
Copy link
Contributor Author

jchannon commented Sep 3, 2015

That passed the tests but I think when it validated the beta7-coreclr helloweb/mvc it then used the beta7 dockerfile. I'll leave it up to MS now to pull this branch and make the necessary changes or point our what needs to change and I'll happily do it

@@ -12,7 +12,7 @@ BASE_IMAGE=$1
TEST_APP=$2
TAG=$3
VERSION=$4

VERSION=$(echo $VERSION | sed -e "s/-coreclr//")
Copy link
Contributor

Choose a reason for hiding this comment

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

you might wanna do this s/-coreclr$// :)

Choose a reason for hiding this comment

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

or even VERSION=${VERSION%-coreclr} :)

Copy link
Contributor

Choose a reason for hiding this comment

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

actually let's extract $SAMPLES_REPO/samples/$VERSION/$TEST_APP into a variable (it repeats at least twice) and handle it there inline like ".../${VERSION%-coreclr}/..."

@ahmetb
Copy link
Contributor

ahmetb commented Sep 3, 2015

@jchannon yeah looks like we need to refactor CI system based on that.

In the meanwhile can you please manually verify HelloMvc or HelloWeb works with this image?

Can you also please update 1.0.0-beta7/README.md to mention this image?

@jakejscott
Copy link

I'll go one even better!
http://basicweb-1835675763.us-east-1.elb.amazonaws.com:5000/

Deployed a test app using that Docker image using a tool called http://www.convox.com/

capture8
@jchannon

@jchannon
Copy link
Contributor Author

jchannon commented Sep 4, 2015

@ahmetalpbalkan do you want me to add a coreclr sample here so the tests in this repo pick up the correct HelloWorld samples? Although that might be a catch22 because it wont be able to use the coreclr version until its published but it wont get published as it wont pass the tests here properly 😄

@jchannon
Copy link
Contributor Author

jchannon commented Sep 4, 2015

@superlogical i see from that you hardcoded the path to dnu/dnx? I've tried building HelloWeb/Mvc locally and it says dnu/dnx isnt in the PATH when it clearly is

@@ -0,0 +1,25 @@
FROM debian:jessie
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

a later debian release than wheezy with the dependencies we need in it

Copy link
Contributor

Choose a reason for hiding this comment

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

@jchannon can you please check if we still need to compile libuv ourselves in jessie? Historically in #22 we started to compile this ourselves, if the libuv in jessie repos is good enough then we can move all images to jessie in a separate PR.

cc: @akoeplinger

Choose a reason for hiding this comment

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

@ahmetalpbalkan yeah, jessie is still on 0.10 while we need 1.x: https://packages.debian.org/jessie/libuv-dev


RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_USER_HOME=$DNX_USER_HOME DNX_BRANCH=v$DNX_VERSION sh
RUN bash -c "source $DNX_USER_HOME/dnvm/dnvm.sh \
&& dnvm upgrade -r coreclr"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is better do it like the other versions. This implicitly downloads the latest version of the runtime and doesn't set the alias which is required for the PATH.

RUN bash -c "source $DNX_USER_HOME/dnvm/dnvm.sh \
    && dnvm install $DNX_VERSION -r coreclr -a default \
    && dnvm alias default | xargs -i ln -s $DNX_USER_HOME/runtimes/{}$DNX_USER_HOME/runtimes/default"

I can conform that my application is building and runs correctly after this change.

@vlesierse
Copy link
Contributor

I have to agree with @ahmetalpbalkan that tagging the image with coreclr-1.0.0-beta7 is better. Shouldn't this reflect in the folder structure as well?

@jchannon
Copy link
Contributor Author

jchannon commented Sep 4, 2015

Helloworld samples work with last commit. Good spot @vlesierse

@jakejscott
Copy link

@jchannon Yeah I hard coded the path to dnu and dnx to get it working. I wish dnu/dnx and dnvm was a single binary

@akoeplinger
Copy link

@superlogical FYI dnu and dnx are already a single binary (there's dnu.cmd that just calls into dnx.exe with some arguments). dnvm needs to be separate and unmanaged code (it's a powershell/bash script), because where would the dnx that you need to download a new dnx come from otherwise? 😄

@ahmetb
Copy link
Contributor

ahmetb commented Sep 9, 2015

@jchannon this ready to go?

@jchannon
Copy link
Contributor Author

jchannon commented Sep 9, 2015

yup, go go go but i imagine youll have to merge the sample first

@ahmetb
Copy link
Contributor

ahmetb commented Sep 9, 2015

This made me wonder how does this build pass if the sample is not merged.

@jchannon
Copy link
Contributor Author

jchannon commented Sep 9, 2015

because it uses the 1.0.0-beta7 version. thats what i saw in the build log anyway

@jchannon
Copy link
Contributor Author

jchannon commented Sep 9, 2015

[CI] Verifying 'HelloWeb' app with 'aspnet-ci:1.0.0-beta7-coreclr'
[CI] Injecting Dockerfile to project HelloWeb...
total 16
drwxrwxr-x 1 ubuntu ubuntu  126 Sep  4 13:24 .
drwxrwxr-x 1 ubuntu ubuntu   98 Sep  4 13:24 ..
-rw-rw-r-- 1 ubuntu ubuntu  172 Sep  4 13:24 Dockerfile
-rw-rw-r-- 1 ubuntu ubuntu 1144 Sep  4 13:24 HelloWeb.xproj
-rw-rw-r-- 1 ubuntu ubuntu  985 Sep  4 13:24 project.json
drwxrwxr-x 1 ubuntu ubuntu   38 Sep  4 13:24 Properties
-rw-rw-r-- 1 ubuntu ubuntu  340 Sep  4 13:24 Startup.cs
drwxrwxr-x 1 ubuntu ubuntu   18 Sep  4 13:24 wwwroot
Using existing Dockerfile in the sample.
Dockerfile:
FROM microsoft/aspnet:1.0.0-beta7

COPY project.json /app/
WORKDIR /app
RUN ["dnu", "restore"]
COPY . /app

EXPOSE 5004
ENTRYPOINT ["dnx", "-p", "project.json", "kestrel"]

@jchannon
Copy link
Contributor Author

jchannon commented Sep 9, 2015

I think its because of the build-app-image.sh as it removes the -coreclr suffix so it then uses the 1.0.0-beta7 instead of 1.0.0-beta7-coreclr

@ahmetb
Copy link
Contributor

ahmetb commented Sep 9, 2015

@jchannon for now my suggestion is, just like we trim the -coreclr from the dirname in the CI scripts, we can "sed --in-place" to replace the image name for coreclr samples.

Or a better one: For coreclr images, we can clone the repo and copy the samples into a -coreclr folder just like you did here and do the replacement there in the CI scripts. It would look just the same to the script then.

What do you think?

@jchannon
Copy link
Contributor Author

jchannon commented Sep 9, 2015

I'm easy, I guess whatever is easiest long term for you to maintain 😄

@ahmetb
Copy link
Contributor

ahmetb commented Sep 9, 2015

Let's go with the second option if it sounds good to you as well. Thank you so much. @jchannon

@jchannon
Copy link
Contributor Author

jchannon commented Sep 9, 2015

Just to clarify, the cloning already happens as part of the CI build so you want to make a copy of that directory or clone twice one into a samples directory and one into a sample-coreclr directory? I'm wondering if this is a change you guys might have to do?

@ahmetb
Copy link
Contributor

ahmetb commented Sep 9, 2015

@jchannon I think if the tag ends with -coreclr you will need to

cp -rf samples/${VERSION%-coreclr}  samples/${VERSION}

so we'll have samples/1.0.0-beta7-coreclr directory just like the PR you sent to aspnet/Home repo. And then we'd go in there and:

sed -i '/^FROM/ s/$/-coreclr/'

to append -coreclr to the line that begins like FROM and replace Dockerfile like that just like you did in the other PR.

@jchannon
Copy link
Contributor Author

jchannon commented Sep 9, 2015

Actually wouldn't it just be easier of we remove the ${VERSION%-coreclr} so
when its cloned from the samples it will use the 1.0.0-beta7-coreclr
directory and image?

On 9 September 2015 at 17:59, Ahmet Alp Balkan [email protected]
wrote:

@jchannon https://github.com/jchannon I think if the tag ends with
-coreclr you will need to

cp -rf samples/${VERSION%-coreclr} samples/${VERSION}

so we'll have samples/1.0.0-beta7-coreclr directory just like the PR you
sent to aspnet/Home repo. And then we'd go in there and:

sed -i '/^FROM/ s/$/-coreclr/'

to append -coreclr to the line that begins with FROM and replace
dockerfile like that.


Reply to this email directly or view it on GitHub
#84 (comment).

@ahmetb
Copy link
Contributor

ahmetb commented Sep 9, 2015

@jchannon my argument is, for now let's not duplicate samples in the aspnet/Home repo. Even with your PR we will need re-tagging the version to include your commit. I don't think the -coreclr directory should not exist in aspnet/Home for now. Makes sense?

@ahmetb
Copy link
Contributor

ahmetb commented Sep 9, 2015

BTW if there's anything blocked on this, we can merge and release the image but I prefer waiting on the fix for the CI script.

@@ -14,6 +14,7 @@ This project is part of ASP.NET 5. You can find samples, documentation, and gett
## Supported tags

* [`1.0.0-beta7`, `latest` _(1.0.0-beta7/Dockerfile)_](https://github.com/aspnet/aspnet-docker/blob/master/1.0.0-beta7/Dockerfile)
* [`1.0.0-beta7`, `coreclr` _(1.0.0-beta7/Dockerfile)_](https://github.com/aspnet/aspnet-docker/blob/master/1.0.0-beta7-coreclr/Dockerfile)
Copy link
Contributor

Choose a reason for hiding this comment

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

@jchannon this line should just be coreclr-1.0.0-beta7, I don't think we need to maintain a coreclr tag for now.

@jchannon
Copy link
Contributor Author

I think its best you finish this off

@ahmetb
Copy link
Contributor

ahmetb commented Sep 14, 2015

OK, merging. Thanks @jchannon

ahmetb added a commit that referenced this pull request Sep 14, 2015
Add beta7 coreclr dockerfile
@ahmetb ahmetb merged commit bc61194 into aspnet:master Sep 14, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants