-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
52 lines (36 loc) · 1.47 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
# https://github.com/84codes/crystal-container-images
FROM 84codes/crystal:1.13.2-ubuntu-24.04 AS builder
LABEL org.opencontainers.image.title="runway"
LABEL org.opencontainers.image.description="clearing code for take off"
LABEL org.opencontainers.image.source="https://github.com/runwaylab/runway"
LABEL org.opencontainers.image.documentation="https://github.com/runwaylab/runway"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.authors="Grant Birkinbine"
WORKDIR /app
# install build dependencies
RUN apt-get update && apt-get install libssh2-1-dev unzip wget -y
# install yq
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq
# copy core scripts
COPY script/ script/
# copy all vendored dependencies
COPY vendor/shards/cache/ vendor/shards/cache/
# copy shard files
COPY shard.lock shard.lock
COPY shard.yml shard.yml
# bootstrap the project
RUN script/bootstrap --production
# copy all source files (ensure to use a .dockerignore file for efficient copying)
COPY . .
# build the project
RUN script/build --production
# https://github.com/phusion/baseimage-docker
FROM ghcr.io/phusion/baseimage:noble-1.0.0
# install runtime dependencies
RUN apt-get update && apt-get install libssh2-1-dev libevent-dev -y
WORKDIR /app
######### CUSTOM SECTION PER PROJECT #########
# copy the binary from the builder stage
COPY --from=builder /app/bin/runway .
# run the binary
ENTRYPOINT ["./runway"]