Skip to content

Commit 8af7cc0

Browse files
committed
Cloud Build custom docker image
1 parent 70ef0ac commit 8af7cc0

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM debian:latest
2+
3+
# Installing Java (and curl)
4+
RUN apt-get update && apt-get install -y curl default-jre default-jdk
5+
RUN apt-get install -y build-essential
6+
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash
7+
RUN nvm install .
8+
RUN nvm use .
9+
10+
RUN npm install -g yarn firebase-tools
11+
12+
RUN firebase setup:emulators:firestore
13+
14+
COPY . /
15+
16+
CMD yarn

cloudbuild.yaml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,21 @@
44
# @next `gcloud builds submit --substitutions=TAG_NAME="v1.2.3-rc.1"`
55
# @latest `gcloud builds submit --substitutions=TAG_NAME="v1.2.3"`
66
steps:
7-
- name: 'gcr.io/cloud-builders/yarn'
7+
- name: 'gcr.io/cloud-builders/docker'
8+
args: ['pull', 'gcr.io/reactfire/docker']
9+
- name: 'gcr.io/cloud-builders/docker'
10+
args: ['build', '-t', 'gcr.io/reactfire/docker', '--cache-from', 'gcr.io/reactfire/docker']
11+
- name: 'gcr.io/cloud-builders/docker'
12+
args: ['push', 'gcr.io/reactfire/firebase']
13+
- name: 'gcr.io/reactfire/docker'
814
args: ['install', '--frozen-lockfile']
9-
- name: 'gcr.io/cloud-builders/yarn'
15+
- name: 'gcr.io/reactfire/docker'
1016
dir: 'reactfire'
1117
args: ['build']
12-
- name: 'gcr.io/cloud-builders/yarn'
18+
- name: 'gcr.io/reactfire/docker'
1319
dir: 'reactfire'
1420
args: ['test']
15-
- name: 'gcr.io/cloud-builders/npm'
21+
- name: 'gcr.io/reactfire/docker'
1622
dir: 'reactfire/pub/reactfire'
1723
entrypoint: 'bash'
1824
env:
@@ -24,4 +30,7 @@ steps:
2430
secrets:
2531
- kmsKeyName: projects/reactfire/locations/global/keyRings/cloud-build/cryptoKeys/cloud-build
2632
secretEnv:
27-
NPM_TOKEN: CiQADamFn5XzbeNQgzTGST9r3Tp5skWlDbBiWaZljffgEm0yIxYSTQC1QbtmDtScXx1BPE+d3CP9rXvOY+n5J0XRuLTTqN7RaqyipCEqTi7+z1kI6mKyBo2ilsMtOtngNzbOZ8kZeUDA80ISLWrNs0hF8k78
33+
NPM_TOKEN: CiQADamFn5XzbeNQgzTGST9r3Tp5skWlDbBiWaZljffgEm0yIxYSTQC1QbtmDtScXx1BPE+d3CP9rXvOY+n5J0XRuLTTqN7RaqyipCEqTi7+z1kI6mKyBo2ilsMtOtngNzbOZ8kZeUDA80ISLWrNs0hF8k78
34+
35+
images:
36+
- gcr.io/reactfire/docker

0 commit comments

Comments
 (0)