-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (35 loc) · 1.34 KB
/
Dockerfile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
## COMPILER
FROM public.ecr.aws/amazonlinux/amazonlinux:latest as compiler
RUN yum -y update \
&& yum -y install unzip
RUN mkdir -p /elwood/run-compiler
# compliele and install deno
RUN curl -fsSL https://deno.land/install.sh | /bin/sh
COPY ./src /elwood/run-compiler/src
COPY ./deno.json /elwood/run-compiler/src/deno.json
COPY ./deno.lock /elwood/run-compiler/src/deno.lock
RUN cd /elwood/run-compiler/src \
&& ~/.deno/bin/deno compile -A --unstable-worker-options --include ./libs/expression/worker.ts -o ../runtime ./launch.ts
## ENV
FROM public.ecr.aws/amazonlinux/amazonlinux:latest
# set some environment variables
ENV ELWOOD_RUNNER_ROOT /elwood/run
ENV ELWOOD_RUNNER_WORKSPACE_DIR /elwood/run/runner/workspace
ENV ELWOOD_RUNNER_EXECUTION_UID 3982
ENV ELWOOD_RUNNER_EXECUTION_GID 3982
ENV ELWOOD_RUNNER_DENO_BIN /elwood/run/runner/bin/deno
RUN mkdir -p /elwood/build
COPY ./build/bootstrap.sh /elwood/build/bootstrap.sh
RUN chmod +x /elwood/build/bootstrap.sh \
&& ./elwood/build/bootstrap.sh \
&& rm -r /elwood/build
COPY --from=compiler /elwood/run-compiler/runtime /elwood/run/bin/runtime
COPY ./actions /elwood/run/actions
RUN tar --version \
&& curl --version \
&& unzip -v \
&& python --version \
&& pip --version \
&& /elwood/run/bin/runtime --version
ENTRYPOINT ["/elwood/run/bin/runtime"]
CMD ["serve"]