Skip to content

Instantly share code, notes, and snippets.

@hiroqn
Created May 14, 2016 05:43
Show Gist options
  • Save hiroqn/a5b0d5db288b473e2acc643ebc845d94 to your computer and use it in GitHub Desktop.
Save hiroqn/a5b0d5db288b473e2acc643ebc845d94 to your computer and use it in GitHub Desktop.
bucklescript dockerfile
FROM alpine:latest
MAINTAINER hiroqn
ENV npm_package_name bs-platform
RUN apk upgrade --update \
&& apk add --virtual build-dependencies build-base perl git make gcc \
&& git clone https://github.com/bloomberg/bucklescript.git --recursive \
&& cd ./bucklescript/ocaml/ \
&& git checkout master \
&& ./configure -prefix `pwd` \
&& make world.opt \
&& make install \
&& PATH=$(pwd)/bin:$PATH \
&& cd ../jscomp \
&& make world \
&& apk del build-dependencies \
&& PATH=/bucklescript/jscomp/bin:$PATH \
&& mv /bucklescript/jscomp/bin/bsc /bin/bsc \
&& mv /bucklescript/jscomp/stdlib / \
&& rm -rf /bucklescript
ENV BSC_LIB /stdlib
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment