forked from epi-project/brane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
152 lines (97 loc) · 3.5 KB
/
Dockerfile.dev
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# DOCKERFILE.dev for BRANE
# by Tim Müller and Onno Valkering
#
# Contains the Dockerfile for the various Brane instance images.
#
# This version builds the development images, which prefer build speed and
# debugging over fast executables by simply copying pre-build executables from
# the project 'target' directory.
#
# This results in much faster build times when building repeatedly, due to the
# build cache being re-used, and (on virtualized Docker environments) much
# faster disk I/O times.
#
# For a release version, see Dockerfile.rls.
#
##### BASE IMAGE #####
# This image defines the base image for all Brane service images.
# Note: we don't do 20.04 because the skopeo alternative link has died
# Note: we'd like to go to 22.04, but for now this is in conflict with OpenSSL
# Note: actually we're doing 22.04 but using 21.10 repos
FROM ubuntu:22.04 AS brane-base
LABEL org.opencontainers.image.source https://github.com/epi-project/Brane
# Add the log directory
RUN mkdir -p /logs/profile
# Add an ubuntu 21.10 source for libssl1.1 (insecure, but it's the dev image anyway)
RUN echo "deb http://old-releases.ubuntu.com/ubuntu impish-security main" >> /etc/apt/sources.list
# Install libssl (the Rust crate depends on it)
RUN apt-get update && apt-get install -y \
libssl1.1 \
&& rm -rf /var/lib/apt/lists/*
# If ever run, run a shell
ENTRYPOINT [ "/bin/bash" ]
##### BRANE-PRX #####
# This image contains the Brane proxy service.
FROM brane-base AS brane-prx
# Define the architecture argument
ARG ARCH
# Copy `brane-prx` from build stage
COPY ./.container-bins/$ARCH/brane-prx /brane-prx
RUN chmod +x /brane-prx
# Run the compiled executable as base
ENTRYPOINT [ "/brane-prx", "--debug" ]
##### BRANE-API #####
# This image contains the Brane API service.
FROM brane-base AS brane-api
# Define the architecture argument
ARG ARCH
# Install additional runtime dependencies specific for brane-api
RUN apt-get update && apt-get install -y \
gnupg2 \
wget \
&& rm -rf /var/lib/apt/lists/*
# Copy `brane-api` from build stage
COPY ./.container-bins/$ARCH/brane-api /brane-api
RUN chmod +x /brane-api
# Run the compiled executable as base
ENTRYPOINT [ "/brane-api", "--debug" ]
##### BRANE-DRV #####
# This image contains the Brane driver service.
FROM brane-base AS brane-drv
# Define the architecture argument
ARG ARCH
# Copy `brane-drv` from build stage
COPY ./.container-bins/$ARCH/brane-drv /brane-drv
RUN chmod +x /brane-drv
# Run the compiled executable as base
ENTRYPOINT [ "/brane-drv", "--debug" ]
##### BRANE-PLR #####
# This image contains the Brane planner service.
FROM brane-base AS brane-plr
# Define the architecture argument
ARG ARCH
# Copy `brane-plr` from build stage
COPY ./.container-bins/$ARCH/brane-plr /brane-plr
RUN chmod +x /brane-plr
# Run the compiled executable as base
ENTRYPOINT [ "/brane-plr", "--debug" ]
##### BRANE-JOB #####
# This image contains the Brane job service.
FROM brane-base AS brane-job
# Define the architecture argument
ARG ARCH
# Copy `brane-job` from build stage
COPY ./.container-bins/$ARCH/brane-job /brane-job
RUN chmod +x /brane-job
# Run the compiled executable as base
ENTRYPOINT [ "/brane-job", "--debug" ]
##### BRANE-REG #####
# This image contains the Brane registry service.
FROM brane-base AS brane-reg
# Define the architecture argument
ARG ARCH
# Copy `brane-job` from build stage
COPY ./.container-bins/$ARCH/brane-reg /brane-reg
RUN chmod +x /brane-reg
# Run the compiled executable as base
ENTRYPOINT [ "/brane-reg", "--debug" ]