Merge pull request #62 from stefanprodan/base-image

Push base image to Docker Hub
This commit is contained in:
Stefan Prodan
2020-05-15 13:00:18 +03:00
committed by GitHub
4 changed files with 18 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ jobs:
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin;
echo $QUAY_PASS | docker login -u $QUAY_USER --password-stdin quay.io;
make push-container;
make push-base;
fi
push-binary:

10
Dockerfile.base Normal file
View File

@@ -0,0 +1,10 @@
FROM golang:1.14
WORKDIR /workspace
# copy modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache modules
RUN go mod download

View File

@@ -33,6 +33,12 @@ build-charts:
build-container:
docker build -t $(DOCKER_IMAGE_NAME):$(VERSION) .
build-base:
docker build -f Dockerfile.base -t $(DOCKER_REPOSITORY)/podinfo-base:latest .
push-base: build-base
docker push $(DOCKER_REPOSITORY)/podinfo-base:latest
test-container:
@docker rm -f podinfo || true
@docker run -dp 9898:9898 --name=podinfo $(DOCKER_IMAGE_NAME):$(VERSION)

View File

@@ -6,7 +6,7 @@ spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: backend
name: frontend
minReplicas: 1
maxReplicas: 4
metrics: