mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
cmd: use dockerfile to generate win event messages
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
## Generate `event_messages.bin`
|
||||
|
||||
```console
|
||||
$ docker run --rm -it -v "$(pwd):/winresources" debian:bookworm-slim bash
|
||||
root@9ad2260f6ebc:/# apt-get update -y && apt-get install -y binutils-mingw-w64-x86-64
|
||||
root@9ad2260f6ebc:/# x86_64-w64-mingw32-windmc -v /winresources/event_messages.mc
|
||||
root@9ad2260f6ebc:/# mv MSG00001.bin /winresources/event_messages.bin
|
||||
```
|
||||
19
cmd/dockerd/winresources/Dockerfile
Normal file
19
cmd/dockerd/winresources/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG DEBIAN_VERSION=bookworm
|
||||
ARG XX_VERSION=1.6.1
|
||||
|
||||
# xx is a helper for cross-compilation
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
||||
|
||||
FROM --platform=$BUILDPLATFORM debian:${DEBIAN_VERSION}-slim AS build
|
||||
COPY --link --from=xx / /
|
||||
ARG TARGETPLATFORM
|
||||
RUN apt-get update && xx-apt-get --no-install-recommends install -y binutils
|
||||
WORKDIR /out
|
||||
RUN --mount=type=bind,target=/winresources \
|
||||
x86_64-w64-mingw32-windmc -v /winresources/event_messages.mc \
|
||||
&& mv MSG00001.bin event_messages.bin
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build /out /
|
||||
33
cmd/dockerd/winresources/event_messages.h
Normal file
33
cmd/dockerd/winresources/event_messages.h
Normal file
@@ -0,0 +1,33 @@
|
||||
/* Do not edit this file manually.
|
||||
This file is autogenerated by windmc. */
|
||||
|
||||
//
|
||||
// The values are 32 bit layed out as follows:
|
||||
//
|
||||
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
|
||||
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
|
||||
// +---+-+-+-----------------------+-------------------------------+
|
||||
// |Sev|C|R| Facility | Code |
|
||||
// +---+-+-+-----------------------+-------------------------------+
|
||||
//
|
||||
// where
|
||||
//
|
||||
// C - is the Customer code flag
|
||||
//
|
||||
// R - is a reserved bit
|
||||
//
|
||||
// Code - is the facility's status code
|
||||
//
|
||||
// Sev - is the severity code
|
||||
//
|
||||
// Success - 00
|
||||
// Informational - 01
|
||||
// Warning - 02
|
||||
// Error - 03
|
||||
//
|
||||
// Facility - is the facility code
|
||||
//
|
||||
// System - 00ff
|
||||
// Application - 0fff
|
||||
//
|
||||
|
||||
9
cmd/dockerd/winresources/event_messages.rc
Normal file
9
cmd/dockerd/winresources/event_messages.rc
Normal file
@@ -0,0 +1,9 @@
|
||||
/* Do not edit this file manually.
|
||||
This file is autogenerated by windmc. */
|
||||
|
||||
|
||||
// Country: United States
|
||||
// Language: English
|
||||
#pragma code_page(1252)
|
||||
LANGUAGE 0x9, 0x1
|
||||
1 MESSAGETABLE "MSG00001.bin"
|
||||
Reference in New Issue
Block a user