mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
Use scratch image for container.
By disabling CGO, we can use the `scratch` image instead of the `fedora` image, allowing a lighter weight image.
This commit is contained in:
@@ -11,10 +11,9 @@
|
|||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
FROM scratch
|
||||||
FROM fedora
|
|
||||||
|
|
||||||
MAINTAINER Avesh Agarwal <avagarwa@redhat.com>
|
MAINTAINER Avesh Agarwal <avagarwa@redhat.com>
|
||||||
|
|
||||||
COPY _output/bin/descheduler /bin/descheduler
|
COPY _output/bin/descheduler /bin/descheduler
|
||||||
CMD ["/bin/descheduler --help"]
|
CMD ["/bin/descheduler", "--help"]
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -30,7 +30,7 @@ IMAGE:=descheduler:$(VERSION)
|
|||||||
all: build
|
all: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
go build ${LDFLAGS} -o _output/bin/descheduler github.com/kubernetes-incubator/descheduler/cmd/descheduler
|
CGO_ENABLED=0 go build ${LDFLAGS} -o _output/bin/descheduler github.com/kubernetes-incubator/descheduler/cmd/descheduler
|
||||||
|
|
||||||
image: build
|
image: build
|
||||||
docker build -t $(IMAGE) .
|
docker build -t $(IMAGE) .
|
||||||
|
|||||||
Reference in New Issue
Block a user