Skip to content

Commit 53fe232

Browse files
committed
fix: inline build CLI image.
1 parent 0c9439e commit 53fe232

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

.github/workflows/publish-image.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ jobs:
2020
with:
2121
username: ${{ secrets.DOCKERHUB_USERNAME }}
2222
password: ${{ secrets.DOCKERHUB_TOKEN }}
23-
- name: Setup Go
24-
uses: actions/setup-go@v3
25-
with:
26-
go-version: 1.18
27-
- name: Build
28-
run: make build
2923
- name: Set commit sha
3024
id: vars
3125
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

Dockerfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
FROM golang:buster as build
2+
3+
WORKDIR /app/
4+
5+
# Install dependencies
6+
COPY go.mod go.sum ./
7+
RUN go mod download
8+
9+
COPY . .
10+
11+
RUN make build
12+
113
FROM python:3.9-slim
214

315
LABEL "repository"="https://github.com/nitrictech/cli"
@@ -87,4 +99,4 @@ RUN pulumi plugin install resource random
8799
ENV HOST_DOCKER_INTERNAL_IFACE eth0
88100
ENV PULUMI_SKIP_UPDATE_CHECK "true"
89101

90-
COPY bin/nitric /usr/bin/
102+
COPY --from=build /app/bin/nitric /usr/bin/

go.mod

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ require (
66
github.com/AlecAivazis/survey/v2 v2.3.5
77
github.com/Azure/azure-sdk-for-go v66.0.0+incompatible
88
github.com/Azure/go-autorest/autorest/to v0.4.0
9-
github.com/avast/retry-go v3.0.0+incompatible
109
github.com/davecgh/go-spew v1.1.1
1110
github.com/docker/cli v20.10.17+incompatible
1211
github.com/docker/docker v20.10.17+incompatible
@@ -16,7 +15,6 @@ require (
1615
github.com/golang/mock v1.6.0
1716
github.com/golangci/golangci-lint v1.46.2
1817
github.com/google/go-cmp v0.5.8
19-
github.com/google/uuid v1.3.0
2018
github.com/hashicorp/consul/sdk v0.11.0
2119
github.com/hashicorp/go-getter v1.6.2
2220
github.com/hashicorp/go-version v1.6.0
@@ -52,6 +50,11 @@ require (
5250
gopkg.in/yaml.v2 v2.4.0
5351
)
5452

53+
require (
54+
github.com/avast/retry-go v3.0.0+incompatible
55+
github.com/google/uuid v1.3.0
56+
)
57+
5558
require (
5659
4d63.com/gochecknoglobals v0.1.0 // indirect
5760
atomicgo.dev/cursor v0.1.1 // indirect

0 commit comments

Comments
 (0)