mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 09:18:59 +00:00
f7dd8c86cd
Related to #6364 and #6363, this: - Adds a new Docker image, `fleetdm/fleetctl` equipped with all necessary dependencies to build Fleet-osquery binaries for all platforms - Modifies the package generation logic to special case this scenario via an environment variable `FLEETCTL_NATIVE_TOOLING` - Adds a new GitHub workflow to test this There are more details in the README, but part of the special-casing logic is in place to output the binaries to a folder named `build` when they are run with `FLEETCTL_NATIVE_TOOLING`, this is so we can persist the binary generated by the docker container via a bind mount: ```bash docker run -v "$(pwd):/build" fleetdm/fleetctl package --type=msi ``` To test this changeset, I have generated packages for all platforms, both via the new Docker image and via the classic `fleetctl package`.
22 lines
705 B
Docker
22 lines
705 B
Docker
FROM debian:stable-slim
|
|
|
|
RUN apt-get update \
|
|
&& dpkg --add-architecture i386 \
|
|
&& apt update \
|
|
&& apt install -y --no-install-recommends ca-certificates cpio libxml2 wine wine32 libgtk-3-0 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# copy macOS dependencies
|
|
COPY --from=fleetdm/bomutils:latest /usr/bin/mkbom /usr/local/bin/xar /usr/bin/
|
|
COPY --from=fleetdm/bomutils:latest /usr/local/lib /usr/local/lib/
|
|
|
|
# copy Windows dependencies
|
|
COPY --from=fleetdm/wix:latest /home/wine /home/wine
|
|
|
|
# copy fleetctl
|
|
COPY build/binary-bundle/linux/fleetctl /usr/bin/fleetctl
|
|
|
|
ENV FLEETCTL_NATIVE_TOOLING=1 WINEPREFIX=/home/wine/.wine WINEARCH=win32 PATH="/home/wine/bin:$PATH" WINEDEBUG=-all
|
|
|
|
ENTRYPOINT ["fleetctl"]
|