-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.bundle
32 lines (26 loc) · 1.76 KB
/
Dockerfile.bundle
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
#syntax=docker/dockerfile:1
ARG NODECG_VERSION=1.9.0-ystv
FROM registry.comp.ystv.co.uk/nodecg/nodecg:v${NODECG_VERSION} AS build
ENV CI=true
RUN apt-get update && apt-get install build-essential python3 -y
WORKDIR /usr/src/app/bundles/ystv-sports-graphics
COPY .yarnrc.yml /usr/src/app/bundles/ystv-sports-graphics/
COPY .yarn /usr/src/app/bundles/ystv-sports-graphics/.yarn
COPY patches/ /usr/src/app/bundles/ystv-sports-graphics/patches/
COPY package.json /usr/src/app/bundles/ystv-sports-graphics/
COPY scores-src/package.json /usr/src/app/bundles/ystv-sports-graphics/scores-src/
COPY bundle-src/package.json /usr/src/app/bundles/ystv-sports-graphics/bundle-src/
COPY yarn.lock /usr/src/app/bundles/ystv-sports-graphics/
RUN --mount=type=cache,target=.yarn/cache/,id=sports-graphics-yarn yarn --immutable --inline-builds
# Everything up to here *must* be identical to Dockerfile.common
COPY scores-src/ /usr/src/app/bundles/ystv-sports-graphics/scores-src/
COPY bundle-src/ /usr/src/app/bundles/ystv-sports-graphics/bundle-src/
RUN yarn bundle:build
FROM registry.comp.ystv.co.uk/nodecg/nodecg:v${NODECG_VERSION}
COPY --from=build /usr/src/app/bundles/ystv-sports-graphics/package.json /usr/src/app/bundles/ystv-sports-graphics/package.json
COPY --from=build /usr/src/app/bundles/ystv-sports-graphics/bundle-src/schemas/ /usr/src/app/bundles/ystv-sports-graphics/schemas/
COPY --from=build /usr/src/app/bundles/ystv-sports-graphics/extension.js /usr/src/app/bundles/ystv-sports-graphics/extension.js
COPY --from=build /usr/src/app/bundles/ystv-sports-graphics/dashboard/ /usr/src/app/bundles/ystv-sports-graphics/dashboard/
COPY --from=build /usr/src/app/bundles/ystv-sports-graphics/graphics/ /usr/src/app/bundles/ystv-sports-graphics/graphics/
ARG GIT_REV=unknown
LABEL ystv.git-rev=${GIT_REV}