Skip to content

Commit

Permalink
Build wixl
Browse files Browse the repository at this point in the history
  • Loading branch information
defensivedepth committed Nov 26, 2024
1 parent a964e76 commit 969367a
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions so-elastic-agent-builder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
# or more contributor license agreements. Licensed under the Elastic License 2.0; you may not use
# this file except in compliance with the Elastic License 2.0.

FROM ghcr.io/security-onion-solutions/golang:1.22.6-alpine

ARG MSITOOLS_VERSION=v0.103

FROM alpine:3.19 as msibuilder

# Re-declare ARG to make it available in this stage
ARG MSITOOLS_VERSION

# Install build dependencies
RUN apk add --no-cache \
git build-base autoconf automake libtool pkgconfig \
glib-dev libgsf-dev util-linux-dev libxml2-dev \
gobject-introspection-dev meson ninja vala bison \
libgcab-dev g++ \
&& rm -rf /var/cache/apk/*

# Clone and build msitools
RUN git clone https://github.com/GNOME/msitools.git /build/msitools \
&& cd /build/msitools \
&& git checkout ${MSITOOLS_VERSION} \
&& git submodule update --init \
&& meson setup builddir \
&& ninja -C builddir install

# Final stage with Go
FROM ghcr.io/security-onion-solutions/golang:1.22.6-alpine

# Install runtime dependencies for wixl
RUN apk add --no-cache \
glib libgsf libxml2 util-linux \
gobject-introspection libgcab make

# Copy msitools files from builder
COPY --from=msibuilder /usr/local/bin/wixl* /usr/local/bin/
COPY --from=msibuilder /usr/local/lib/libmsi* /usr/local/lib/
COPY --from=msibuilder /usr/local/share/wixl-0.103 /usr/local/share/wixl-0.103

# Set up Go workspace
RUN mkdir /workspace
ADD source /workspace
WORKDIR /workspace
Expand Down

0 comments on commit 969367a

Please sign in to comment.