-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (27 loc) · 759 Bytes
/
Dockerfile
File metadata and controls
31 lines (27 loc) · 759 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
30
31
FROM alpine:3 as alpine-dev
RUN apk add --no-cache gcc musl-dev make git bash
FROM alpine-dev as build
WORKDIR /build/janet
ARG COMMIT=HEAD
RUN git clone https://github.com/janet-lang/janet.git .
RUN git checkout $COMMIT
# Use COPY instead of git clone to work with a local janet install
# COPY . .
RUN make PREFIX=/app -j
RUN make test
RUN make PREFIX=/app install
# Add jpm but only for the dev image
FROM build as build-sdk
WORKDIR /build/jpm
RUN git clone https://github.com/janet-lang/jpm .
RUN PREFIX=/app /app/bin/janet bootstrap.janet
FROM alpine-dev as sdk
COPY --from=build-sdk /app /app
ENV PATH="/app/bin:$PATH"
WORKDIR /app
CMD ["bash"]
FROM alpine as core
COPY --from=build /app/ /app/
ENV PATH="/app/bin:$PATH"
WORKDIR /app
CMD ["janet"]