Skip to content

Commit 3f97a30

Browse files
authored
Arm64 docker (#1030)
* chore: making docker images arch agnostic through docker buildx
1 parent 4d27a9f commit 3f97a30

File tree

7 files changed

+68
-110
lines changed

7 files changed

+68
-110
lines changed

.github/workflows/cyclonus-netpol-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
3939
- name: Make NPM image
4040
run: |
41-
VERSION=cyclonus make azure-npm-image
41+
VERSION=cyclonus IMAGE_PLATFORM_ARCHES=linux/amd64 IMAGE_ACTION=load make azure-npm-image
4242
4343
- name: Install Azure NPM
4444
run: |

.pipelines/npm/npm-conformance-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ jobs:
7272
- script: |
7373
echo Tag: $(TAG)
7474
echo ResourceGroup: $(RESOURCE_GROUP)
75+
docker run --privileged --rm tonistiigi/binfmt --install arm64
7576
VERSION=$(TAG) make azure-npm-image
76-
docker push $IMAGE_REGISTRY/azure-npm:$(TAG)
7777
displayName: 'Build and Push NPM Image'
7878
7979
- task: Docker@2

.pipelines/pipeline.yaml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,18 @@ stages:
9191
pool:
9292
name: "$(BUILD_POOL_NAME_DEFAULT)"
9393
steps:
94+
- task: Docker@2
95+
displayName: Docker Login
96+
inputs:
97+
containerRegistry: $(ACR_SERVICE_CONNECTION)
98+
command: 'login'
99+
addPipelineData: false
100+
94101
- script: |
95102
echo Tag is $(TAG)
96103
sudo make tools-images VERSION=$(TAG)
97-
sudo make all-images VERSION=$(TAG)
104+
docker run --privileged --rm tonistiigi/binfmt --install arm64
105+
make all-images VERSION=$(TAG)
98106
name: "BuildImages"
99107
displayName: "Build Images"
100108
@@ -108,20 +116,7 @@ stages:
108116
name: "TrivyScan"
109117
displayName: "Image Vulnerability Scan"
110118
111-
- task: Docker@2
112-
displayName: Docker Login
113-
inputs:
114-
containerRegistry: $(ACR_SERVICE_CONNECTION)
115-
command: 'login'
116-
addPipelineData: false
117-
118119
- script: |
119-
docker tag $IMAGE_REGISTRY/azure-npm:$(TAG) $IMAGE_REGISTRY/azure-npm:$(TAG)-test
120-
docker push $IMAGE_REGISTRY/azure-npm:$(TAG)-test
121-
122-
docker tag $IMAGE_REGISTRY/azure-cns:$(TAG) $IMAGE_REGISTRY/azure-cns:$(TAG)-test
123-
docker push $IMAGE_REGISTRY/azure-cns:$(TAG)-test
124-
125120
docker tag $IMAGE_REGISTRY/azure-cni-manager:$(TAG) $IMAGE_REGISTRY/azure-cni-manager:$(TAG)-test
126121
docker push $IMAGE_REGISTRY/azure-cni-manager:$(TAG)-test
127122
@@ -135,8 +130,8 @@ stages:
135130
done
136131
}
137132
138-
auto-retry docker pull $IMAGE_REGISTRY/azure-npm:$(TAG)-test
139-
auto-retry docker pull $IMAGE_REGISTRY/azure-cns:$(TAG)-test
133+
auto-retry docker pull $IMAGE_REGISTRY/azure-npm:$(TAG)
134+
auto-retry docker pull $IMAGE_REGISTRY/azure-cns:$(TAG)
140135
auto-retry docker pull $IMAGE_REGISTRY/azure-cni-manager:$(TAG)-test
141136
name: "mcrreplication"
142137
displayName: "Push NPM Image and Wait for Repository"

.pipelines/singletenancy/aks-engine/e2e-step-template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ steps:
6868
cat '${{ parameters.clusterDefinition }}'
6969
cat '${{ parameters.clusterDefinition }}' | jq --arg cnikey $CNI_TYPE --arg cniurl $CNI_URL '.properties.orchestratorProfile.kubernetesConfig[$cnikey]= $cniurl' > '${{ parameters.clusterDefinition }}'.tmp
7070
cat '${{ parameters.clusterDefinition }}'.tmp | jq --arg tag $(Tag) '.properties.orchestratorProfile.kubernetesConfig.azureCNIVersion = $tag' > '${{ parameters.clusterDefinition }}'
71-
cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage $IMAGE_REGISTRY/azure-npm:$(Tag)-test '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp
71+
cat '${{ parameters.clusterDefinition }}' | jq --arg npmimage $IMAGE_REGISTRY/azure-npm:$(Tag) '.properties.orchestratorProfile.kubernetesConfig.addons[0].containers[0].image = $npmimage' > '${{ parameters.clusterDefinition }}'.tmp
7272
mv '${{ parameters.clusterDefinition }}'.tmp '${{ parameters.clusterDefinition }}'
7373
echo "Running E2E tests against a cluster built with the following API model:"
7474
cp ${{ parameters.clusterDefinition }} clusterDefinition.json

Makefile

Lines changed: 30 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ CNI_IPAM_DIR = $(REPO_ROOT)/cni/ipam/plugin
3434
CNI_IPAMV6_DIR = $(REPO_ROOT)/cni/ipam/pluginv6
3535
CNI_TELEMETRY_DIR = $(REPO_ROOT)/cni/telemetry/service
3636
ACNCLI_DIR = $(REPO_ROOT)/tools/acncli
37-
TELEMETRY_CONF_DIR = $(REPO_ROOT)/telemetry
3837
CNS_DIR = $(REPO_ROOT)/cns/service
39-
CNMS_DIR = $(REPO_ROOT)/cnms/service
4038
NPM_DIR = $(REPO_ROOT)/npm/cmd
4139
OUTPUT_DIR = $(REPO_ROOT)/output
4240
BUILD_DIR = $(OUTPUT_DIR)/$(GOOS)_$(GOARCH)
@@ -48,15 +46,16 @@ CNI_MULTITENANCY_BUILD_DIR = $(BUILD_DIR)/cni-multitenancy
4846
CNI_SWIFT_BUILD_DIR = $(BUILD_DIR)/cni-swift
4947
CNI_BAREMETAL_BUILD_DIR = $(BUILD_DIR)/cni-baremetal
5048
CNS_BUILD_DIR = $(BUILD_DIR)/cns
51-
CNMS_BUILD_DIR = $(BUILD_DIR)/cnms
5249
NPM_BUILD_DIR = $(BUILD_DIR)/npm
53-
NPM_RELATIVE_BUILD_DIR = output/$(GOOS)_$(GOARCH)/npm
54-
NPM_TELEMETRY_DIR = $(NPM_BUILD_DIR)/telemetry
5550
TOOLS_DIR = $(REPO_ROOT)/build/tools
5651
TOOLS_BIN_DIR = $(TOOLS_DIR)/bin
5752
CNI_AI_ID = 5515a1eb-b2bc-406a-98eb-ba462e6f0411
53+
CNS_AI_ID = ce672799-8f08-4235-8c12-08563dc2acef
5854
NPM_AI_ID = 014c22bd-4107-459e-8475-67909e96edcb
5955
ACN_PACKAGE_PATH = github.com/Azure/azure-container-networking
56+
CNI_AI_PATH=$(ACN_PACKAGE_PATH)/telemetry.aiMetadata
57+
CNS_AI_PATH=$(ACN_PACKAGE_PATH)/cns/logger.aiMetadata
58+
NPM_AI_PATH=$(ACN_PACKAGE_PATH)/npm.aiMetadata
6059

6160
# Tool paths
6261
CONTROLLER_GEN := $(TOOLS_BIN_DIR)/controller-gen
@@ -75,13 +74,10 @@ CNI_MULTITENANCY_ARCHIVE_NAME = azure-vnet-cni-multitenancy-$(GOOS)-$(GOARCH)-$(
7574
CNI_SWIFT_ARCHIVE_NAME = azure-vnet-cni-swift-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
7675
CNI_BAREMETAL_ARCHIVE_NAME = azure-vnet-cni-baremetal-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
7776
CNS_ARCHIVE_NAME = azure-cns-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
78-
CNMS_ARCHIVE_NAME = azure-cnms-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
7977
NPM_ARCHIVE_NAME = azure-npm-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
80-
NPM_IMAGE_ARCHIVE_NAME = azure-npm-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
78+
NPM_IMAGE_INFO_FILE = azure-npm-$(VERSION).txt
8179
CNI_IMAGE_ARCHIVE_NAME = azure-cni-manager-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
82-
CNMS_IMAGE_ARCHIVE_NAME = azure-cnms-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
83-
TELEMETRY_IMAGE_ARCHIVE_NAME = azure-vnet-telemetry-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
84-
CNS_IMAGE_ARCHIVE_NAME = azure-cns-$(GOOS)-$(GOARCH)-$(VERSION).$(ARCHIVE_EXT)
80+
CNS_IMAGE_INFO_FILE = azure-cns-$(VERSION).txt
8581

8682
# Docker libnetwork (CNM) plugin v2 image parameters.
8783
CNM_PLUGIN_IMAGE ?= microsoft/azure-vnet-plugin
@@ -92,21 +88,16 @@ IMAGE_REGISTRY ?= acnpublic.azurecr.io
9288
# Azure network policy manager parameters.
9389
AZURE_NPM_IMAGE ?= $(IMAGE_REGISTRY)/azure-npm
9490

95-
# Azure cnms parameters
96-
AZURE_CNMS_IMAGE ?= $(IMAGE_REGISTRY)/networkmonitor
97-
9891
# Azure CNI installer parameters
9992
AZURE_CNI_IMAGE = $(IMAGE_REGISTRY)/azure-cni-manager
10093

101-
# Azure vnet telemetry image parameters.
102-
AZURE_VNET_TELEMETRY_IMAGE = $(IMAGE_REGISTRY)/azure-vnet-telemetry
103-
10494
# Azure container networking service image paramters.
10595
AZURE_CNS_IMAGE = $(IMAGE_REGISTRY)/azure-cns
10696

97+
IMAGE_PLATFORM_ARCHES ?= linux/amd64,linux/arm64
98+
IMAGE_ACTION ?= push
99+
107100
VERSION ?= $(shell git describe --tags --always --dirty)
108-
CNS_AI_ID = ce672799-8f08-4235-8c12-08563dc2acef
109-
cnsaipath=github.com/Azure/azure-container-networking/cns/logger.aiMetadata
110101

111102
# Default target
112103
.PHONY: all-binaries-platforms
@@ -119,7 +110,7 @@ all-binaries-platforms: ## Make all platform binaries
119110

120111
# OS specific binaries/images
121112
ifeq ($(GOOS),linux)
122-
all-binaries: azure-cnm-plugin azure-cni-plugin azure-cns azure-cnms azure-npm
113+
all-binaries: azure-cnm-plugin azure-cni-plugin azure-cns azure-npm
123114
all-images: azure-npm-image azure-cns-image
124115
else
125116
all-binaries: azure-cnm-plugin azure-cni-plugin azure-cns
@@ -166,7 +157,7 @@ azure-vnet-ipamv6-binary:
166157
# Build the Azure CNI telemetry binary.
167158
.PHONY: azure-vnet-telemetry-binary
168159
azure-vnet-telemetry-binary:
169-
cd $(CNI_TELEMETRY_DIR) && CGO_ENABLED=0 go build -v -o $(CNI_BUILD_DIR)/azure-vnet-telemetry$(EXE_EXT) -ldflags "-X main.version=$(VERSION) -X $(ACN_PACKAGE_PATH)/telemetry.aiMetadata=$(CNI_AI_ID)" -gcflags="-dwarflocationlists=true"
160+
cd $(CNI_TELEMETRY_DIR) && CGO_ENABLED=0 go build -v -o $(CNI_BUILD_DIR)/azure-vnet-telemetry$(EXE_EXT) -ldflags "-X main.version=$(VERSION) -X $(CNI_AI_PATH)=$(CNI_AI_ID)" -gcflags="-dwarflocationlists=true"
170161

171162
# Build the Azure CLI network binary.
172163
.PHONY: acncli-binary
@@ -176,18 +167,13 @@ acncli-binary:
176167
# Build the Azure CNS binary.
177168
.PHONY: azure-cns-binary
178169
azure-cns-binary:
179-
cd $(CNS_DIR) && CGO_ENABLED=0 go build -v -o $(CNS_BUILD_DIR)/azure-cns$(EXE_EXT) -ldflags "-X main.version=$(VERSION) -X $(cnsaipath)=$(CNS_AI_ID)" -gcflags="-dwarflocationlists=true"
180-
181-
# Build the Azure CNMS binary.
182-
.PHONY: azure-cnms-binary
183-
azure-cnms-binary:
184-
cd $(CNMS_DIR) && CGO_ENABLED=0 go build -v -o $(CNMS_BUILD_DIR)/azure-cnms$(EXE_EXT) -ldflags "-X main.version=$(VERSION)" -gcflags="-dwarflocationlists=true"
170+
cd $(CNS_DIR) && CGO_ENABLED=0 go build -v -o $(CNS_BUILD_DIR)/azure-cns$(EXE_EXT) -ldflags "-X main.version=$(VERSION) -X $(CNS_AI_PATH)=$(CNS_AI_ID)" -gcflags="-dwarflocationlists=true"
185171

186172
# Build the Azure NPM binary.
187173
.PHONY: azure-npm-binary
188174
azure-npm-binary:
189175
cd $(CNI_TELEMETRY_DIR) && CGO_ENABLED=0 go build -v -o $(NPM_BUILD_DIR)/azure-vnet-telemetry$(EXE_EXT) -ldflags "-X main.version=$(VERSION)" -gcflags="-dwarflocationlists=true"
190-
cd $(NPM_DIR) && CGO_ENABLED=0 go build -v -o $(NPM_BUILD_DIR)/azure-npm$(EXE_EXT) -ldflags "-X main.version=$(VERSION) -X $(ACN_PACKAGE_PATH)/npm.aiMetadata=$(NPM_AI_ID)" -gcflags="-dwarflocationlists=true"
176+
cd $(NPM_DIR) && CGO_ENABLED=0 go build -v -o $(NPM_BUILD_DIR)/azure-npm$(EXE_EXT) -ldflags "-X main.version=$(VERSION) -X $(NPM_AI_PATH)=$(NPM_AI_ID)" -gcflags="-dwarflocationlists=true"
191177

192178

193179
########################### Container Images ########################
@@ -233,58 +219,42 @@ azure-cnm-plugin-image: azure-cnm-plugin
233219

234220
# Build the Azure NPM image.
235221
.PHONY: azure-npm-image
236-
azure-npm-image: azure-npm-binary
222+
azure-npm-image:
237223
ifeq ($(GOOS),linux)
238224
$(MKDIR) $(IMAGE_DIR)
239-
docker build \
225+
docker buildx create --use
226+
docker buildx build \
240227
--no-cache \
241228
-f npm/Dockerfile \
242229
-t $(AZURE_NPM_IMAGE):$(VERSION) \
243-
--build-arg NPM_BUILD_DIR=$(NPM_RELATIVE_BUILD_DIR) \
244-
.
245-
docker save $(AZURE_NPM_IMAGE):$(VERSION) | gzip -c > $(IMAGE_DIR)/$(NPM_IMAGE_ARCHIVE_NAME)
246-
endif
247-
248-
# Build the Azure CNMS image
249-
.PHONY: azure-cnms-image
250-
azure-cnms-image: azure-cnms-binary
251-
ifeq ($(GOOS),linux)
252-
$(MKDIR) $(IMAGE_DIR)
253-
docker build \
254-
--no-cache \
255-
-f cnms/Dockerfile \
256-
-t $(AZURE_CNMS_IMAGE):$(VERSION) \
257-
--build-arg CNMS_BUILD_DIR=$(CNMS_BUILD_DIR) \
230+
--build-arg VERSION=$(VERSION) \
231+
--build-arg NPM_AI_PATH=$(NPM_AI_PATH) \
232+
--build-arg NPM_AI_ID=$(NPM_AI_ID) \
233+
--platform=$(IMAGE_PLATFORM_ARCHES) \
234+
--$(IMAGE_ACTION) \
258235
.
259-
docker save $(AZURE_CNMS_IMAGE):$(VERSION) | gzip -c > $(IMAGE_DIR)/$(CNMS_IMAGE_ARCHIVE_NAME)
236+
237+
echo $(AZURE_NPM_IMAGE):$(VERSION) > $(IMAGE_DIR)/$(NPM_IMAGE_INFO_FILE)
260238
endif
261239

262-
# Build the Azure vnet telemetry image
263-
.PHONY: azure-vnet-telemetry-image
264-
azure-vnet-telemetry-image: azure-vnet-telemetry-binary
265-
$(MKDIR) $(IMAGE_DIR)
266-
docker build \
267-
-f cni/telemetry/Dockerfile \
268-
-t $(AZURE_VNET_TELEMETRY_IMAGE):$(VERSION) \
269-
--build-arg TELEMETRY_BUILD_DIR=$(NPM_BUILD_DIR) \
270-
--build-arg TELEMETRY_CONF_DIR=$(TELEMETRY_CONF_DIR) \
271-
.
272-
docker save $(AZURE_VNET_TELEMETRY_IMAGE):$(VERSION) | gzip -c > $(NPM_BUILD_DIR)/$(TELEMETRY_IMAGE_ARCHIVE_NAME)
273-
274240
# Build the Azure CNS image
275241
.PHONY: azure-cns-image
276242
azure-cns-image:
277243
ifeq ($(GOOS),linux)
278244
$(MKDIR) $(IMAGE_DIR)
279-
docker build \
245+
docker buildx create --use
246+
docker buildx build \
280247
--no-cache \
281248
-f cns/Dockerfile \
282249
-t $(AZURE_CNS_IMAGE):$(VERSION) \
283250
--build-arg VERSION=$(VERSION) \
284-
--build-arg CNS_AI_PATH=$(cnsaipath) \
251+
--build-arg CNS_AI_PATH=$(CNS_AI_PATH) \
285252
--build-arg CNS_AI_ID=$(CNS_AI_ID) \
253+
--platform=$(IMAGE_PLATFORM_ARCHES) \
254+
--$(IMAGE_ACTION) \
286255
.
287-
docker save $(AZURE_CNS_IMAGE):$(VERSION) | gzip -c > $(IMAGE_DIR)/$(CNS_IMAGE_ARCHIVE_NAME)
256+
257+
echo $(AZURE_CNS_IMAGE):$(VERSION) > $(IMAGE_DIR)/$(CNS_IMAGE_INFO_FILE)
288258
endif
289259

290260
########################### Archives ################################
@@ -339,13 +309,6 @@ cns-archive: azure-cns-binary
339309
cp cns/configuration/cns_config.json $(CNS_BUILD_DIR)/cns_config.json
340310
cd $(CNS_BUILD_DIR) && $(ARCHIVE_CMD) $(CNS_ARCHIVE_NAME) azure-cns$(EXE_EXT) cns_config.json
341311

342-
# Create a CNMS archive for the target platform. Only Linux is supported for now.
343-
.PHONY: cnms-archive
344-
cnms-archive: azure-cnms-binary
345-
ifeq ($(GOOS),linux)
346-
cd $(CNMS_BUILD_DIR) && $(ARCHIVE_CMD) $(CNMS_ARCHIVE_NAME) azure-cnms$(EXE_EXT)
347-
endif
348-
349312
# Create a NPM archive for the target platform. Only Linux is supported for now.
350313
.PHONY: npm-archive
351314
npm-archive: azure-npm-binary
@@ -364,21 +327,6 @@ release:
364327
publish-azure-cnm-plugin-image:
365328
docker plugin push $(CNM_PLUGIN_IMAGE):$(VERSION)
366329

367-
# Publish the Azure vnet telemetry image to a Docker registry
368-
.PHONY: publish-azure-vnet-telemetry-image
369-
publish-azure-vnet-telemetry-image:
370-
docker push $(AZURE_VNET_TELEMETRY_IMAGE):$(VERSION)
371-
372-
# Publish the Azure NPM image to a Docker registry
373-
.PHONY: publish-azure-npm-image
374-
publish-azure-npm-image:
375-
docker push $(AZURE_NPM_IMAGE):$(VERSION)
376-
377-
# Publish the Azure CNS image to a Docker registry
378-
.PHONY: publish-azure-cns-image
379-
publish-azure-cns-image:
380-
docker push $(AZURE_CNS_IMAGE):$(VERSION)
381-
382330
############################ Linting ################################
383331

384332
PRETTYGOTEST := $(shell command -v gotest 2> /dev/null)

cns/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM alpine:latest as certs
33
RUN apk --update add ca-certificates
44

55
# Build cns
6-
FROM golang:1.16-alpine AS builder
6+
FROM golang:1.17 AS builder
77
# Build ars
88
ARG VERSION
99
ARG CNS_AI_PATH
@@ -15,10 +15,10 @@ WORKDIR /usr/local/src/cns
1515
COPY . .
1616

1717
# Build cns
18-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /usr/local/bin/azure-cns -ldflags "-X main.version="$VERSION" -X "$CNS_AI_PATH"="$CNS_AI_ID" -s -w " cns/service/*.go
18+
RUN CGO_ENABLED=0 go build -a -o /usr/local/bin/azure-cns -ldflags "-X main.version="$VERSION" -X "$CNS_AI_PATH"="$CNS_AI_ID"" -gcflags="-dwarflocationlists=true" cns/service/*.go
1919

2020
# Build aitelemetry
21-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o /usr/local/bin/azure-vnet-telemetry -ldflags "-X main.version="$VERSION" -s -w" cni/telemetry/service/*.go
21+
RUN CGO_ENABLED=0 go build -a -o /usr/local/bin/azure-vnet-telemetry -ldflags "-X main.version="$VERSION"" -gcflags="-dwarflocationlists=true" cni/telemetry/service/*.go
2222

2323
# Copy into final image
2424
FROM scratch

npm/Dockerfile

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
1-
# Use a minimal image as a parent image
1+
# Build npm
2+
FROM golang:1.17 AS builder
3+
# Build args
4+
ARG VERSION
5+
ARG NPM_AI_PATH
6+
ARG NPM_AI_ID
7+
8+
WORKDIR /usr/local/src/npm
9+
10+
# Copy the source
11+
COPY . .
12+
13+
# Build npm
14+
RUN CGO_ENABLED=0 go build -v -o /usr/local/bin/azure-npm -ldflags "-X main.version="$VERSION" -X "$NPM_AI_PATH"="$NPM_AI_ID"" -gcflags="-dwarflocationlists=true" npm/cmd/*.go
15+
16+
# Use a minimal image as a final image base
217
FROM ubuntu:focal
3-
ARG NPM_BUILD_DIR
18+
19+
# Copy into final image
20+
COPY --from=builder /usr/local/bin/azure-npm \
21+
/usr/bin/azure-npm
422

523
# Install dependencies.
624
RUN apt-get update
@@ -9,10 +27,7 @@ RUN apt-get install -y ipset
927
RUN apt-get install -y ca-certificates
1028
RUN apt-get upgrade -y
1129

12-
# Install plugin.
13-
COPY $NPM_BUILD_DIR/azure-npm /usr/bin
14-
15-
WORKDIR /usr/bin
30+
RUN chmod +x /usr/bin/azure-npm
1631

1732
# Run the npm command by default when the container starts.
1833
ENTRYPOINT ["/usr/bin/azure-npm", "start"]

0 commit comments

Comments
 (0)