-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
47 lines (39 loc) · 1.15 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
# syntax=docker/dockerfile:1.5.2
FROM denoland/deno:debian-1.33.2 as base_deno
RUN apt update && apt install -y jq git wget libssl1.1 libc6 curl
FROM base_deno
# TODO: will go away after ever sdk supports deno land
WORKDIR /app/node_modules/@eversdk/lib-web
COPY --link node_modules/@eversdk/lib-web/index.js ./
COPY --link node_modules/@eversdk/lib-web/eversdk.wasm ./
COPY --link --from=teamgosh/gosh-cli:0.2.0 /usr/local/bin/gosh-cli /usr/local/bin/gosh-cli
WORKDIR /workdir
ARG BRANCH=dev
ENV BRANCH=${BRANCH}
RUN <<EOF
set -ex
echo "$BRANCH"
git clone --branch "$BRANCH" --depth 1 https://github.com/gosh-sh/gosh.git gosh
cd gosh
bash install.sh
mv $HOME/.gosh/git-remote-gosh* /usr/local/bin/
cd ..
rm -rf gosh
EOF
# WARNING: change workdir after
WORKDIR /app/src
COPY --link src/_deps.ts _deps.ts
RUN deno cache _deps.ts
WORKDIR /app
COPY --link src src
COPY --link bin bin
COPY --link abi abi
COPY --link emails emails
ARG GOSH_ENDPOINTS
ENV GOSH_ENDPOINTS=${GOSH_ENDPOINTS}
ENV GOSHCLI_CONFIG=/gosh-cli.conf.json
# TODO fix endpoints
RUN <<EOF
gosh-cli config --is_json true
gosh-cli config -e ${GOSH_ENDPOINTS}
EOF