-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (54 loc) · 1.93 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
59
60
61
62
63
64
FROM ubuntu:focal
# Install dependency libraries
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install --no-install-recommends -y \
curl \
ca-certificates \
git \
mysql-server
# Fetch and run script to add nodejs repos alongside standard Ubuntu ones.
# Replace setup_12.x with setup_xx.x for whatever specific version is needed.
# https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-20-04#option-2-%E2%80%94-installing-node-js-with-apt-using-a-nodesource-ppa
RUN curl https://deb.nodesource.com/setup_12.x > setup_nodejs.sh
RUN bash setup_nodejs.sh
# Then install Nodejs (and NPM as a implicit, recommended install)
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Additional source compilation tools needed for ARM64 builds, e.g. Mac M1
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python2 \
python-is-python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*
# With NPM installed, we can install yarn
RUN npm install --global yarn
# Fetch the korp-frontend
WORKDIR /opt
RUN git clone https://github.com/spraakbanken/korp-frontend.git
WORKDIR /opt/korp-frontend
RUN git fetch --all
# Checkout commit from 18.1.2022
RUN git checkout d3a09514a43c4e9a266c5be50fa181f57b60d70b
# Fetch korp-frontend dependencies
WORKDIR /opt/korp-frontend
RUN yarn
# Add basic UI localisation for Danish
COPY app /opt/korp-frontend/app
# Install mkdocs for building user guides.
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN pip install mkdocs
# This Dockerfile does NOT contain an entrypoint! You MUST extend it by writing
# your own Dockerfile, using `korp_frontend_base` as a parent image.
# See korp/setups/clarin for an example setup including a Dockerfile.