-
-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 751 Bytes
/
Dockerfile
File metadata and controls
29 lines (20 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This Dockerfile constructs an environment in which the Grain compiler can be built and used.
FROM ospencer/esy:0.9.2 AS esy
FROM node:22
LABEL name="Grain"
LABEL description="Grain CLI"
LABEL vcs-url="https://github.com/grain-lang/grain"
LABEL maintainer="team@grain-lang.org"
COPY . /grain
WORKDIR /grain
# esy does not currently ship linux/arm64 binaries, so we manually patch it in
# Install dependencies but don't allow esy's postinstall script to run
RUN npm ci --ignore-scripts
COPY --from=esy /usr/local /grain/node_modules/esy
# Necessary because we disabled scripts during the original install
RUN npm run prepare
# Build the compiler and CLI
RUN npm run compiler build
# Set up container environment
WORKDIR /
CMD [ "/bin/bash" ]