-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
35 lines (23 loc) · 935 Bytes
/
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
ARG NODE_VERSION=stable
FROM europe-west1-docker.pkg.dev/connectedcars-build/node-builder/master:$NODE_VERSION as builder
ARG COMMIT_SHA=master
ENV COMMIT_SHA=$COMMIT_SHA
WORKDIR /app
USER root
# Install deps for mysqld and both mysqld 5.7 and mysqld 8.0
RUN apt-get update \
&& apt-get -y install libaio1 libnuma1 libwrap0 libevent-core-2.1-7 libevent-pthreads-2.1-7 libmecab2 mysql-client-core-8.0 \
&& apt-get download mysql-server-core-5.7 mysql-server-core-8.0
RUN dpkg-deb -xv mysql-server-core-5.7_*.deb mysql-5.7
RUN dpkg-deb -xv mysql-server-core-8.0_*.deb mysql-8.0
USER builder
# Copy application code.
COPY --chown=builder:builder package.json package-lock.json /app/
RUN npm install
COPY --chown=builder:builder . /app/
RUN npm run build
ENV MYSQLD=/app/mysql-8.0/usr/sbin/mysqld
ENV MYSQLD_57=/app/mysql-5.7/usr/sbin/mysqld
ENV MYSQLD_80=/app/mysql-8.0/usr/sbin/mysqld
# Run ci checks
RUN npm run ci-auto