-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
58 lines (50 loc) · 2.65 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
53
54
55
56
57
58
# This is intended to run in Local Development (dev) and Github Actions (test/prod)
# BUILD_ENV options (dev, test, prod) dev for local testing and test for github actions testing on prod ready code
ARG BUILD_ENV="prod"
ARG MAINTAINER="[email protected];"
#---------------------------------------------------------------------------------------------------
# Base for dev environement
#---------------------------------------------------------------------------------------------------
FROM continuumio/miniconda3:22.11.1 as build_dev
ONBUILD COPY /lib/bifrostlib /bifrost/lib/bifrostlib
ONBUILD WORKDIR /bifrost/lib/bifrostlib/
ONBUILD RUN \
pip install -r requirements.txt; \
pip install --no-cache -e file:///bifrost/lib/bifrostlib;
#---------------------------------------------------------------------------------------------------
# Base for production environment
#---------------------------------------------------------------------------------------------------
FROM continuumio/miniconda3:22.11.1 as build_prod
ONBUILD WORKDIR /bifrost/lib/bifrostlib
ONBUILD COPY ./ ./
ONBUILD RUN \
pip install file:///bifrost/lib/bifrostlib/
#---------------------------------------------------------------------------------------------------
# Base for test environment (prod with tests)
#---------------------------------------------------------------------------------------------------
FROM continuumio/miniconda3:22.11.1 as build_test
ONBUILD WORKDIR /bifrost/lib/bifrostlib
ONBUILD COPY ./ ./
ONBUILD RUN \
pip install -r requirements.txt \
pip install file:///bifrost/lib/bifrostlib/
#---------------------------------------------------------------------------------------------------
# Details
#---------------------------------------------------------------------------------------------------
FROM build_${BUILD_ENV}
LABEL \
description="Docker environment for bifrostlib" \
environment="${BUILD_ENV}" \
maintainer="${MAINTAINER}"
#---------------------------------------------------------------------------------------------------
# Additional programs for all environments
#---------------------------------------------------------------------------------------------------
# N/A
#---------------------------------------------------------------------------------------------------
# Additional resources
#---------------------------------------------------------------------------------------------------
# N/A
#---------------------------------------------------------------------------------------------------
# Run and entry commands
#---------------------------------------------------------------------------------------------------
# WORKDIR /bifrost/lib/bifrostlib