-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
26 lines (21 loc) · 984 Bytes
/
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
FROM denoland/deno:alpine-2.1.4@sha256:bbbc64e254c4fbd928da597faae8633e2302c630386f3469595444c0b29e14d6
# Label the container
LABEL maintainer="Justin Chase <[email protected]>"
LABEL repository="https://github.com/optum/semver-cli"
LABEL homepage="https://github.com/optum/semver-cli"
WORKDIR /app
ENV PATH="/app/bin:${PATH}"
RUN mkdir -p /app/bin
# Cache the dependencies as a layer (the following two steps are re-run only when deps.ts is modified).
# Ideally cache deps.ts will download and compile _all_ external files used in main.ts.
COPY deps/ /app/deps
COPY deno.json /app/
COPY deno.lock /app/
RUN deno cache --allow-import deps/mod.ts
# These steps will be re-run upon any file change in your working directory:
ADD src /app/src
ADD main.ts /app
# Compile the main app so that it doesn't need to be compiled each startup/entry.
RUN deno cache main.ts
RUN deno compile --allow-run --allow-env --allow-read --allow-write -o bin/semver main.ts
ENTRYPOINT ["semver"]