Skip to content

Commit 747604e

Browse files
Merge branch 'up-main' into release/v0.1
2 parents c44f02c + e575053 commit 747604e

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

Dockerfile

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG GARM_REF
33

44
LABEL stage=builder
55

6-
RUN apk add musl-dev gcc libtool m4 autoconf g++ make libblkid util-linux-dev git linux-headers
6+
RUN apk add musl-dev gcc libtool m4 autoconf g++ make libblkid util-linux-dev git linux-headers upx
77
RUN git config --global --add safe.directory /build
88

99
ADD . /build/garm
@@ -13,17 +13,23 @@ RUN git clone https://github.com/cloudbase/garm-provider-openstack /build/garm-p
1313
RUN git clone https://github.com/cloudbase/garm-provider-lxd /build/garm-provider-lxd
1414
RUN git clone https://github.com/cloudbase/garm-provider-incus /build/garm-provider-incus
1515
RUN git clone https://github.com/mercedes-benz/garm-provider-k8s /build/garm-provider-k8s
16+
RUN git clone https://github.com/cloudbase/garm-provider-aws /build/garm-provider-aws
17+
RUN git clone https://github.com/cloudbase/garm-provider-gcp /build/garm-provider-gcp
18+
RUN git clone https://github.com/cloudbase/garm-provider-equinix /build/garm-provider-equinix
1619

1720
RUN cd /build/garm && go build -o /bin/garm \
1821
-tags osusergo,netgo,sqlite_omit_load_extension \
1922
-ldflags "-extldflags '-static' -s -w -X main.Version=$(git describe --tags --match='v[0-9]*' --dirty --always)" \
20-
/build/garm/cmd/garm
23+
/build/garm/cmd/garm && upx /bin/garm
2124
RUN mkdir -p /opt/garm/providers.d
22-
RUN cd /build/garm-provider-azure && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-azure .
23-
RUN cd /build/garm-provider-openstack && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-openstack .
24-
RUN cd /build/garm-provider-lxd && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-lxd .
25-
RUN cd /build/garm-provider-incus && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-incus .
26-
RUN cd /build/garm-provider-k8s/cmd/garm-provider-k8s && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-k8s .
25+
RUN cd /build/garm-provider-azure && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-azure . && upx /opt/garm/providers.d/garm-provider-azure
26+
RUN cd /build/garm-provider-openstack && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-openstack . && upx /opt/garm/providers.d/garm-provider-openstack
27+
RUN cd /build/garm-provider-lxd && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-lxd . && upx /opt/garm/providers.d/garm-provider-lxd
28+
RUN cd /build/garm-provider-incus && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-incus . && upx /opt/garm/providers.d/garm-provider-incus
29+
RUN cd /build/garm-provider-k8s/cmd/garm-provider-k8s && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-k8s . && upx /opt/garm/providers.d/garm-provider-k8s
30+
RUN cd /build/garm-provider-aws && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-aws . && upx /opt/garm/providers.d/garm-provider-aws
31+
RUN cd /build/garm-provider-gcp && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-gcp . && upx /opt/garm/providers.d/garm-provider-gcp
32+
RUN cd /build/garm-provider-equinix && go build -ldflags="-extldflags '-static' -s -w" -o /opt/garm/providers.d/garm-provider-equinix . && upx /opt/garm/providers.d/garm-provider-equinix
2733

2834
FROM scratch
2935

@@ -33,6 +39,9 @@ COPY --from=builder /opt/garm/providers.d/garm-provider-lxd /opt/garm/providers.
3339
COPY --from=builder /opt/garm/providers.d/garm-provider-incus /opt/garm/providers.d/garm-provider-incus
3440
COPY --from=builder /opt/garm/providers.d/garm-provider-k8s /opt/garm/providers.d/garm-provider-k8s
3541
COPY --from=builder /opt/garm/providers.d/garm-provider-azure /opt/garm/providers.d/garm-provider-azure
42+
COPY --from=builder /opt/garm/providers.d/garm-provider-aws /opt/garm/providers.d/garm-provider-aws
43+
COPY --from=builder /opt/garm/providers.d/garm-provider-gcp /opt/garm/providers.d/garm-provider-gcp
44+
COPY --from=builder /opt/garm/providers.d/garm-provider-equinix /opt/garm/providers.d/garm-provider-equinix
3645
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
3746

3847
ENTRYPOINT ["/bin/garm", "-config", "/etc/garm/config.toml"]

0 commit comments

Comments
 (0)