Skip to content

Commit 0c765b6

Browse files
authored
Updated busybox sha; Added dependabot. (#4202)
Signed-off-by: Bartlomiej Plotka <[email protected]>
1 parent c288d41 commit 0c765b6

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
- package_manager: "gomod"
4+
directory: "/"
5+
vendor: false
6+
schedule:
7+
interval: "weekly"
8+
labels: ["dependencies"]
9+
- package_manager: "docker"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"
13+
labels: ["dependencies"]
14+

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# By default we pin to amd64 sha. Use make docker to automatically adjust for arm64 versions.
2-
ARG SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973"
3-
FROM quay.io/prometheus/busybox@sha256:${SHA}
2+
ARG BASE_DOCKER_SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973"
3+
FROM quay.io/prometheus/busybox@sha256:${BASE_DOCKER_SHA}
44
LABEL maintainer="The Thanos Authors"
55

66
COPY /thanos_tmp_for_docker /bin/thanos

Dockerfile.multi-stage

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# By default we pin to amd64 sha. Use make docker to automatically adjust for arm64 versions.
2-
ARG SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973"
2+
ARG BASE_DOCKER_SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973"
33
FROM golang:1.16-alpine3.12 as builder
44

55
WORKDIR $GOPATH/src/github.com/thanos-io/thanos
@@ -16,7 +16,7 @@ RUN git update-index --refresh; make build
1616

1717
# -----------------------------------------------------------------------------
1818

19-
FROM quay.io/prometheus/busybox@sha256:${SHA}
19+
FROM quay.io/prometheus/busybox@sha256:${BASE_DOCKER_SHA}
2020
LABEL maintainer="The Thanos Authors"
2121

2222
COPY --from=builder /go/bin/thanos /bin/thanos

Makefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ DOCKER_IMAGE_REPO ?= quay.io/thanos/thanos
55
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))-$(shell date +%Y-%m-%d)-$(shell git rev-parse --short HEAD)
66
DOCKER_CI_TAG ?= test
77

8-
SHA=''
8+
BASE_DOCKER_SHA=''
99
arch = $(shell uname -m)
1010
# Run `DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect quay.io/prometheus/busybox:latest` to get SHA or
1111
# just visit https://quay.io/repository/prometheus/busybox?tag=latest&tab=tags.
12-
# TODO(bwplotka): Pinning is important but somehow quay kills the old images, so make sure to update regularly (dependabot?)
13-
# Update at 2020.2.01
12+
# TODO(bwplotka): Pinning is important but somehow quay kills the old images, so make sure to update regularly.
13+
# Update at 2021.6.07
1414
ifeq ($(arch), x86_64)
1515
# amd64
16-
SHA="14d68ca3d69fceaa6224250c83d81d935c053fb13594c811038c461194599973"
16+
BASE_DOCKER_SHA="de4af55df1f648a334e16437c550a2907e0aed4f0b0edf454b0b215a9349bdbb"
1717
else ifeq ($(arch), armv8)
1818
# arm64
19-
SHA="4dd2d3bba195563e6cb2b286f23dc832d0fda6c6662e6de2e86df454094b44d8"
19+
BASE_DOCKER_SHA="5591971699f6cf8abf6776495385e9d62751111a8cba56bf4946cf1d0de425ed"
2020
else
2121
echo >&2 "only support amd64 or arm64 arch" && exit 1
2222
endif
@@ -147,7 +147,7 @@ docker: build
147147
@echo ">> copying Thanos from $(PREFIX) to ./thanos_tmp_for_docker"
148148
@cp $(PREFIX)/thanos ./thanos_tmp_for_docker
149149
@echo ">> building docker image 'thanos'"
150-
@docker build -t "thanos" --build-arg SHA=$(SHA) .
150+
@docker build -t "thanos" --build-arg BASE_DOCKER_SHA=$(BASE_DOCKER_SHA) .
151151
@rm ./thanos_tmp_for_docker
152152
else
153153
docker: docker-multi-stage
@@ -157,7 +157,7 @@ endif
157157
docker-multi-stage: ## Builds 'thanos' docker image using multi-stage.
158158
docker-multi-stage:
159159
@echo ">> building docker image 'thanos' with Dockerfile.multi-stage"
160-
@docker build -f Dockerfile.multi-stage -t "thanos" --build-arg SHA=$(SHA) .
160+
@docker build -f Dockerfile.multi-stage -t "thanos" --build-arg BASE_DOCKER_SHA=$(BASE_DOCKER_SHA) .
161161

162162
.PHONY: docker-push
163163
docker-push: ## Pushes 'thanos' docker image build to "$(DOCKER_IMAGE_REPO):$(DOCKER_IMAGE_TAG)".

0 commit comments

Comments
 (0)