1
0
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:
Jelmer Snoeck
2018-02-15 16:49:34 +01:00
parent fc0cd4ba30
commit 65e7093ee7
2 changed files with 3 additions and 4 deletions

View File

@@ -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"]

View File

@@ -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) .