-
Notifications
You must be signed in to change notification settings - Fork 22
/
Dockerfile.jobs
35 lines (25 loc) · 1.17 KB
/
Dockerfile.jobs
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
FROM node:20.12.2-alpine
# Yarn will not install any package listed in devDependencies if the NODE_ENV
# environment variable is set to production. Use this flag to instruct Yarn to
# ignore NODE_ENV and take its production-or-not status from this flag instead.
ARG NODE_ENV=production
# Note layers should be ordered from less to more likely to change.
# Update & install required packages
RUN apk add --update bash jq curl gcc musl-dev python3 python3-dev py3-pip;
# Create and activate a virtual environment
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN python3 -m pip install pipx yq
RUN python3 -m pipx ensurepath
RUN python3 -m pipx install yacron
RUN wget https://github.com/mikefarah/yq/releases/download/v4.6.3/yq_linux_386.tar.gz -O - | tar xz && mv yq_linux_386 /usr/bin/yq
# Needed for Gcloud Storage resumable file uploads
RUN mkdir -p /root/.config
# Set work directory
WORKDIR /service
# Install dependencies and store yarn cache
COPY package.json yarn.lock ./
RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn yarn install --frozen-lockfile
# Copy app source
COPY . .
CMD ["./scripts/entrypoints/jobs.sh", "jobs/default.yml"]