From 045ae2f574e1006cc5990c044fe11c9103790da5 Mon Sep 17 00:00:00 2001 From: jankaspar <2270833+jankaspar@users.noreply.github.com> Date: Tue, 3 Mar 2020 10:29:28 +0000 Subject: [PATCH] Add armadactl docker image. (#326) * Create docker image for armadactl. * Fix armadactl docker entrypoint. --- .circleci/config.yml | 7 +++++++ .gitignore | 1 - build/armadactl/Dockerfile | 13 +++++++++++++ makefile | 6 +++++- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 build/armadactl/Dockerfile diff --git a/.circleci/config.yml b/.circleci/config.yml index 2795a0b5ca3..27a24cf8168 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,6 +99,9 @@ jobs: docker tag armada-executor gresearchdev/armada-executor-dev:${TAG} docker push gresearchdev/armada-executor-dev:${TAG} + docker tag armadactl gresearchdev/armada-armadactl-dev:${TAG} + docker push gresearchdev/armada-armadactl-dev:${TAG} + docker tag armada-fakeexecutor gresearchdev/armada-fakeexecutor-dev:${TAG} docker push gresearchdev/armada-fakeexecutor-dev:${TAG} deploy: @@ -175,6 +178,10 @@ jobs: docker tag gresearchdev/armada-executor-dev:${TAG} gresearchdev/armada-executor:${RELEASE_TAG} docker push gresearchdev/armada-executor:${RELEASE_TAG} + docker pull gresearchdev/armada-armadactl-dev:${TAG} + docker tag gresearchdev/armada-armadactl-dev:${TAG} gresearchdev/armada-armadactl:${RELEASE_TAG} + docker push gresearchdev/armada-armadactl:${RELEASE_TAG} + release-dotnet-client: docker: - image: mcr.microsoft.com/dotnet/core/sdk:3.0.101-alpine3.10 diff --git a/.gitignore b/.gitignore index ae536b0f1ca..489e5bdcad4 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ *.so *.dylib bin/ -armadactl # Test binary, built with `go test -c` *.test diff --git a/build/armadactl/Dockerfile b/build/armadactl/Dockerfile new file mode 100644 index 00000000000..af8fde7e9a1 --- /dev/null +++ b/build/armadactl/Dockerfile @@ -0,0 +1,13 @@ +FROM alpine:3.10 + +RUN apk update && apk add --no-cache ca-certificates + +RUN addgroup -S -g 2000 armada && adduser -S -u 1000 armada -G armada + +USER armada + +COPY ./bin/linux/armadactl /app/ + +WORKDIR /app + +ENTRYPOINT ["./armadactl"] diff --git a/makefile b/makefile index edffc2c596d..351876d7fc3 100644 --- a/makefile +++ b/makefile @@ -43,11 +43,15 @@ build-docker-executor: $(gobuildlinux) -o ./bin/linux/executor cmd/executor/main.go docker build $(dockerFlags) -t armada-executor -f ./build/executor/Dockerfile . +build-docker-armadactl: + $(gobuildlinux) -o ./bin/linux/armadactl cmd/armadactl/main.go + docker build $(dockerFlags) -t armadactl -f ./build/armadactl/Dockerfile . + build-docker-fakeexecutor: $(gobuildlinux) -o ./bin/linux/fakeexecutor cmd/fakeexecutor/main.go docker build $(dockerFlags) -t armada-fakeexecutor -f ./build/fakeexecutor/Dockerfile . -build-docker: build-docker-server build-docker-executor build-docker-fakeexecutor +build-docker: build-docker-server build-docker-executor build-docker-armadactl build-docker-fakeexecutor build-ci: gobuild=$(gobuildlinux) build-ci: build-docker build-armadactl build-load-tester