-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 1.28 KB
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 1.28 KB
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
FROM denoland/deno:alpine-2.7.12@sha256:bfd4b52459d48a24d7e67d0f3fa2931767d22c040a0ee5e8bde531c2a311212e
# Label the container
LABEL maintainer="Justin Chase <justin.chase@optum.com>"
LABEL repository="https://github.com/optum/semver-cli"
LABEL homepage="https://github.com/optum/semver-cli"
# Label as GitHub action
LABEL com.github.actions.name="semver-cli"
# Limit to 160 characters
LABEL com.github.actions.description="Get, set and increment your project version"
# See branding:
# https://docs.github.com/actions/creating-actions/metadata-syntax-for-github-actions#branding
LABEL com.github.actions.icon="activity"
LABEL com.github.actions.color="orange"
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 deno.json/deno.lock is modified).
# Install dependencies from npm and JSR registries instead of copying deps folder
COPY deno.json /app/
COPY deno.lock /app/
RUN rm deno.lock && \
deno install
# 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 compile --allow-run --allow-env --allow-read --allow-write -o bin/semver main.ts
ENTRYPOINT ["semver"]