File tree 4 files changed +9
-12
lines changed
4 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1
- *
2
1
! server
Original file line number Diff line number Diff line change 11
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
- FROM amazonlinux:2 as amazonlinux
15
14
15
+ FROM golang:1.12.7-stretch as builder
16
+ WORKDIR /go/src/github.com/kubernetes-sigs/aws-alb-ingress-controller/
17
+ COPY . .
18
+ RUN make server
19
+
20
+ FROM amazonlinux:2 as amazonlinux
16
21
FROM scratch
17
22
COPY --from=amazonlinux /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/
18
- COPY server server
23
+ COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-alb-ingress-controller/ server server
19
24
ENTRYPOINT ["/server" ]
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ LDFLAGS=-X $(PKG)/version.COMMIT=$(GIT_COMMIT) -X $(PKG)/version.RELEASE=$(TAG)
38
38
server : cmd/main.go
39
39
CGO_ENABLED=0 GOOS=$(OS ) GOARCH=$(ARCH ) go build -a -installsuffix cgo -ldflags ' -s -w $(LDFLAGS)' -o server ./cmd
40
40
41
- container : server
41
+ container :
42
42
docker build --pull -t $(PREFIX ) :$(TAG ) .
43
43
44
44
push :
Original file line number Diff line number Diff line change @@ -128,13 +128,6 @@ build_push_controller_image() {
128
128
return 1
129
129
fi
130
130
131
- echo " Building aws-alb-ingress-controller binary"
132
- make clean && make server
133
- if [[ $? -ne 0 ]]; then
134
- echo " Unable to build aws-alb-ingress-controller binary" >&2
135
- return 1
136
- fi
137
-
138
131
echo " Building aws-alb-ingress-controller image"
139
132
if ! docker build -t " $CONTROLLER_IMAGE_NAME " ./; then
140
133
echo " Unable to build aws-alb-ingress-controller image" >&2
@@ -203,4 +196,4 @@ main() {
203
196
test $cluster_name
204
197
}
205
198
206
- main $@
199
+ main $@
You can’t perform that action at this time.
0 commit comments