Skip to content

Instantly share code, notes, and snippets.

@notogawa
Last active May 3, 2018 15:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save notogawa/d7132045e36402b782fa208ffd5808f0 to your computer and use it in GitHub Desktop.
Save notogawa/d7132045e36402b782fa208ffd5808f0 to your computer and use it in GitHub Desktop.
stack upgrade できないやつ. straceから /etc/protocols が無いのが原因ぽいので,apt install netbase で解決する.
FROM ubuntu:18.04
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
apt-get upgrade -y \
&& DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
haskell-stack \
&& apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
RUN stack upgrade
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM ubuntu:18.04
---> 452a96d81c30
Step 2/3 : RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends haskell-stack && apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
---> Using cache
---> d6254ebf6252
Step 3/3 : RUN stack upgrade
---> Running in 18b2b260ef70
Exception occured when trying to perform binary upgrade:
HttpExceptionRequest Request {
host = "api.github.com"
port = 443
secure = True
requestHeaders = [("Accept","application/json"),("Accept","application/vnd.github.v3+json"),("User-Agent","The Haskell Stack")]
path = "/repos/commercialhaskell/stack/releases/latest"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp))
Falling back to source upgrade
Updating package index Hackage (mirrored at https://s3.amazonaws.com/hackage.fpcomplete.com/) ...
Selected mirror https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading root
SomeRemoteError (HttpExceptionRequest Request {
host = "s3.amazonaws.com"
port = 443
secure = True
requestHeaders = [("Accept-Encoding",""),("Cache-Control","no-transform")]
path = "/hackage.fpcomplete.com/root.json"
queryString = ""
method = "GET"
proxy = Nothing
rawBody = False
redirectCount = 10
responseTimeout = ResponseTimeoutDefault
requestVersion = HTTP/1.1
}
(ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp)))
The command '/bin/sh -c stack upgrade' returned a non-zero code: 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment