microsoft / vscode-dev-containers

NOTE: Most of the contents of this repository have been migrated to the new devcontainers GitHub org (https://github.com/devcontainers). See https://github.com/devcontainers/template-starter and https://github.com/devcontainers/feature-starter for information on creating your own!
https://aka.ms/vscode-remote
MIT License
4.7k stars 1.41k forks source link

Simplified haskell devcontainer. #1705

Open PiotrJustyna opened 1 year ago

PiotrJustyna commented 1 year ago

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

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:

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> 
eitsupi commented 1 year ago

Cross ref devcontainers/features#470

Juancanico5 commented 1 year ago

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>