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

dotnet-install.sh fails to install SDK on Alpine Linux #9144

Closed
natemcmaster opened this issue Mar 8, 2018 · 6 comments
Closed

dotnet-install.sh fails to install SDK on Alpine Linux #9144

natemcmaster opened this issue Mar 8, 2018 · 6 comments
Assignees
Milestone

Comments

@natemcmaster
Copy link
Contributor

Steps to reproduce

FROM microsoft/dotnet:2.1-runtime-deps-alpine
WORKDIR /code/build

RUN apk add --no-cache \
        bash \
        wget \
        curl \
        icu-libs \
        openssl

RUN wget https://raw.githubusercontent.com/dotnet/cli/release/2.1.3xx/scripts/obtain/dotnet-install.sh \
    && chmod +x dotnet-install.sh \
    && ./dotnet-install.sh --version 2.1.300-preview2-008251

docker build . -t test

Expected behavior

Download and extract https://dotnetcli.blob.core.windows.net/dotnet/Sdk/2.1.300-preview2-008251/dotnet-sdk-2.1.300-preview2-008251-alpine.3.6-x64.tar.gz

Actual behavior

# ./dotnet-install.sh --version 2.1.300-preview2-008251
dotnet_install: Error: Unable to locate libunwind. Install libunwind to continue
dotnet_install: Error: Unable to locate libssl. Install libssl to continue
dotnet_install: Error: Unable to locate libicu. Install libicu to continue
dotnet_install: Error: Unable to locate libcurl. Install libcurl to continue

You can disable pre-req check..

export DOTNET_INSTALL_SKIP_PREREQS=1

but then this fails because cp -n is not supported in Alpine

cp: unrecognized option: n
@johnbeisner
Copy link
Contributor

@natemcmaster
Please use 'https://dot.net/v1/dotnet-install.sh' it is the only supported version.

@johnbeisner
Copy link
Contributor

I do not see a "cp -n" in the script. I've checked master, release/2.1.3xx, & the supported version at: 'https://dot.net/v1/dotnet-install.sh'

There is a "cp -R": cp -R $override_switch "$root_path/$path" "$target"
is this what you mean?

@natemcmaster
Copy link
Contributor Author

Please use 'https://dot.net/v1/dotnet-install.sh' it is the only supported version.

Can we update it to include this as well then? dotnet/cli#8314 tput doesn't exist in alpine either.

The -n comes from the value of $override_switch

https://github.com/dotnet/cli/blob/495630fe9782ae70db2547b2474ba332352cfd1d/scripts/obtain/dotnet-install.sh#L573-L580

@livarcocc
Copy link
Contributor

Yes, that should be feasible. @johnbeisner can you work to make sure the change is in the right branch, at which point we should be able to push it.

@johnbeisner
Copy link
Contributor

closing: Alpine fix; plus 1 dotnet/cli#8821

@ghost
Copy link

ghost commented Apr 26, 2018

The original cp: unrecognized option: n error reported in this issue is still present in release/2.1.3xx branch.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 2.1.3xx milestone Jan 31, 2020
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

4 participants