-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
33 lines (27 loc) · 1.03 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
# this docker file is used to create a docker image for the web.
# It currently is being built on dockerhub at dmbymdt/morai and
# then pulled down into a web container.
# To run dockerfile and create own image use from where the dockerfile is located.:
# `docker build --no-cache -t morai .`
# If wanting to build from a specific branch use:
# `docker build --build-arg BRANCH_NAME=dev --no-cache -t morai .`
#
# slim was used instead of alpine because of the need of numpy
FROM python:3.9-slim
# Install git
RUN apt-get update && \
apt-get install -y --no-install-recommends git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set work directory
WORKDIR /code
# Define a build-time argument for the branch name
ARG BRANCH_NAME=main
# Install the package from a specific branch
RUN pip install --no-cache-dir "git+https://github.com/jkoestner/morai.git@${BRANCH_NAME}"
# Create new user
RUN adduser --disabled-password --gecos '' morai && \
chown -R morai:morai /code
USER morai
# Using port 8001 for web
EXPOSE 8001