Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 90dd470

Browse files
committed
Add cloudbuild and update some stuff
1 parent 2f9ca95 commit 90dd470

File tree

3 files changed

+47
-9
lines changed

3 files changed

+47
-9
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ LICENSE
1010
.travis.yml
1111
.gitignore
1212
node_modules/
13+
cloudbuild.yaml

Dockerfile

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:2.7.15-jessie
1+
FROM python:2.7.16-jessie
22

33
# add our user and group first to make sure their IDs get assigned consistently
44
RUN groupadd -r freight && useradd -r -m -g freight freight
@@ -15,12 +15,18 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1515

1616
# grab gosu for easy step-down from root
1717
RUN set -x \
18-
&& export GOSU_VERSION=1.10 \
18+
&& export GOSU_VERSION=1.11 \
1919
&& apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/* \
2020
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
2121
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
2222
&& export GNUPGHOME="$(mktemp -d)" \
23-
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
23+
&& for key in \
24+
B42F6819007F00F88E364FD4036A9C25BF357DD4 \
25+
; do \
26+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
27+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
28+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
29+
done \
2430
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
2531
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
2632
&& chmod +x /usr/local/bin/gosu \
@@ -29,12 +35,18 @@ RUN set -x \
2935

3036
# grab tini for signal processing and zombie killing
3137
RUN set -x \
32-
&& export TINI_VERSION=0.14.0 \
38+
&& export TINI_VERSION=0.18.0 \
3339
&& apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/* \
3440
&& wget -O /usr/local/bin/tini "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini" \
3541
&& wget -O /usr/local/bin/tini.asc "https://github.com/krallin/tini/releases/download/v$TINI_VERSION/tini.asc" \
3642
&& export GNUPGHOME="$(mktemp -d)" \
37-
&& gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys 6380DC428747F6C393FEACA59A84159D7001A4E5 \
43+
&& for key in \
44+
595E85A6B1B4779EA4DAAEC70B588DFF0527A9B7 \
45+
; do \
46+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
47+
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
48+
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
49+
done \
3850
&& gpg --batch --verify /usr/local/bin/tini.asc /usr/local/bin/tini \
3951
&& rm -r "$GNUPGHOME" /usr/local/bin/tini.asc \
4052
&& chmod +x /usr/local/bin/tini \
@@ -67,12 +79,12 @@ RUN set -x \
6779
&& apt-get purge -y --auto-remove wget
6880

6981
RUN set -x \
70-
&& export REDIS_VERSION=3.2.6 \
71-
&& export REDIS_DOWNLOAD_SHA1=0c7bc5c751bdbc6fabed178db9cdbdd948915d1b \
82+
&& export REDIS_VERSION=4.0.14 \
83+
&& export REDIS_DOWNLOAD_SHA256=1e1e18420a86cfb285933123b04a82e1ebda20bfb0a289472745a087587e93a7 \
7284
&& apt-get update && apt-get install -y --no-install-recommends wget && rm -rf /var/lib/apt/lists/* \
7385
&& mkdir -p /usr/src/redis \
7486
&& wget -O redis.tar.gz "http://download.redis.io/releases/redis-$REDIS_VERSION.tar.gz" \
75-
&& echo "$REDIS_DOWNLOAD_SHA1 *redis.tar.gz" | sha1sum -c - \
87+
&& echo "$REDIS_DOWNLOAD_SHA256 *redis.tar.gz" | sha256sum -c - \
7688
&& tar -xzf redis.tar.gz -C /usr/src/redis --strip-components=1 \
7789
&& rm redis.tar.gz \
7890
&& make -C /usr/src/redis \
@@ -128,7 +140,7 @@ ENV PATH="${PATH}:/opt/google-cloud-sdk/bin"
128140
ENV DOCKER_HOST tcp://docker:2375
129141

130142
COPY package.json /usr/src/app/
131-
RUN npm install && npm cache clear
143+
RUN npm install && npm cache clear --force
132144

133145
COPY requirements.txt /usr/src/app/
134146
RUN pip install --no-cache-dir -r requirements.txt

cloudbuild.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
steps:
2+
- name: "gcr.io/cloud-builders/docker"
3+
entrypoint: "bash"
4+
args:
5+
[
6+
"-c",
7+
"docker pull us.gcr.io/$PROJECT_ID/freight:latest || true"
8+
]
9+
10+
- name: "gcr.io/cloud-builders/docker"
11+
args:
12+
[
13+
"build",
14+
"-t", "us.gcr.io/$PROJECT_ID/freight:latest",
15+
"-t", "us.gcr.io/$PROJECT_ID/freight:$COMMIT_SHA",
16+
"--cache-from", "us.gcr.io/$PROJECT_ID/freight:latest",
17+
".",
18+
]
19+
20+
images:
21+
[
22+
"us.gcr.io/$PROJECT_ID/freight:$COMMIT_SHA",
23+
"us.gcr.io/$PROJECT_ID/freight:latest",
24+
]
25+
timeout: 60m

0 commit comments

Comments
 (0)