Il y a quelques images de PureScript
fonctionnant sur Docker Hub, mais celles qui utilisent Node.js v12
et spago
Je n'ai pas pu le trouver, alors je l'ai créé moi-même
Windows10 Home Edition
VirtualBox 6.1.16
docker-machine.exe version 0.16.1, build cce350d7
# Docker Host OS (CoreOS)
$ uname -a
Linux default 4.14.154-boot2docker #1 SMP Thu Nov 14 19:19:08 UTC 2019 x86_64 GNU/Linux
Docker version 19.03.5, build 633a0ea838
docker-compose version 1.26.0, build d4451659
Seulement docker-compose.yml
et Dockerfile
dans le dossier purescript
purescript
| docker-compose.yml
| Dockerfile
docker-compose.yml
docker-compose.yml
version: "3.7"
services:
purescript:
build:
context: .
dockerfile: Dockerfile
image: takaya030/purescript
Dockerfile
Dockerfile
FROM node:12
LABEL maintainer "takaya030"
# install purescript
RUN npm install --global --unsafe-perm purescript spago
# add user
RUN userdel node && \
useradd -m -s /bin/bash pureuser
WORKDIR /home/pureuser
USER pureuser
RUN mkdir tmp && cd tmp && spago init
CMD cd tmp && spago repl
$ cd purescript
$ docker-compose build purescript
Vérifiez l'image
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
takaya030/purescript latest fb50aeb56d04 22 hours ago 1.08GB
node 12 1f560ce4ce7e 4 weeks ago 918MB
$ docker-compose run --rm purescript
[info] Installing 4 dependencies.
[info] Searching for packages cache metadata..
[info] Unable to find packages cache metadata, downloading from GitHub..
[info] Installing and globally caching "psci-support"
[info] Installing and globally caching "console"
[info] Installing and globally caching "effect"
[info] Installing and globally caching "prelude"
[info] Installation complete.
Compiling Type.Data.RowList
Compiling Type.Data.Row
Compiling Record.Unsafe
.
.
.
Compiling Main
Compiling PSCI.Support
Compiling Test.Main
PSCi, version 0.13.8
Type :? for help
import Prelude
> "hello"
"hello"
> 1 + 2 * 3
7
> import Effect.Console
> log "print this to the screen"
print this to the screen
unit
> :quit
See ya!
()
Recommended Posts