vscode-dev-containers icon indicating copy to clipboard operation
vscode-dev-containers copied to clipboard

Simplified haskell devcontainer.

Open PiotrJustyna opened this issue 2 years ago • 2 comments

Proposing a new version of this dockerfile as the current one:

  • does not work on the new apple silicon machines
  • or on corporate machines where ssl certifications stop the ghcup installation.

The dockerfile is a bit simplified following the official ghcup installation instructions + the installation script is supplemented with GHCUP_CURL_OPTS variable which handles problematic ssl certificates (better solutions to this welcome!).Thank you @hasufell for suggesting to use the bootstrap variables (e.g. ghc version).

Linked issues I recently started:

  • https://github.com/haskell/ghcup-hs/issues/696
  • https://github.com/microsoft/vscode-dev-containers/issues/1692

I can confirm this works on an M1 MacBook pro and am hoping the community devcontainers for Haskell start supporting that platform soon.

vscode ➜ /workspaces/haskell-community $ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.2.5
vscode ➜ /workspaces/haskell-community $ ghci
GHCi, version 9.2.5: https://www.haskell.org/ghc/  :? for help
ghci> let a=2+2
ghci> a
4
ghci> 

PiotrJustyna avatar Dec 19 '22 20:12 PiotrJustyna

Cross ref devcontainers/features#470

eitsupi avatar Mar 11 '23 03:03 eitsupi

Proponiendo una nueva versión de este dockerfile como la actual:

  • no funciona en las nuevas máquinas de silicona de Apple
  • o en máquinas corporativas donde las certificaciones ssl detienen la instalación de ghcup.

El dockerfile se simplifica un poco siguiendo las instrucciones oficiales de instalación de ghcup + el script de instalación se complementa con GHCUP_CURL_OPTSuna variable que maneja los certificados SSL problemáticos (¡mejores soluciones para esta bienvenida!). Gracias.@hasufellpor sugerir usar las variables de arranque (por ejemplo, versión ghc).

Problemas vinculados que comencé recientemente:

Puedo confirmar que esto funciona en una MacBook pro M1 y espero que los contenedores de desarrollo de la comunidad para Haskell comiencen a admitir esa plataforma pronto.

vscode ➜ /workspaces/haskell-community $ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.2.5
vscode ➜ /workspaces/haskell-community $ ghci
GHCi, version 9.2.5: https://www.haskell.org/ghc/  :? for help
ghci> let a=2+2
ghci> a
4
ghci> 

Juancanico5 avatar Jun 17 '23 22:06 Juancanico5