mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +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.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
FROM fedora
|
||||
FROM scratch
|
||||
|
||||
MAINTAINER Avesh Agarwal <avagarwa@redhat.com>
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
docker build -t $(IMAGE) .
|
||||
|
||||
Reference in New Issue
Block a user