<p></p>
<p>I think we could do this work in 2 steps:</p>
<ul>
<li>As a first step, we should have the option in the build tool of osm2pgsql (cmake) to build the osm2pgsql binary from the sources statically. This would allow the creation of a single binary with no dependencies on external libraries. This is very similar to what golang does natively. This would be completely integrated into the already existing CMake build tool. So no new scripts there, only options added to an already existing script.</li>
<li>As a second step, using a multi-stage build to build from the sources (including with Lua support) and then placing the created binary in a container. This new Dockerfile would be a copy and paste from the build instructions that are already given and maintained in the README.md</li>
</ul>
<p>This feature could really help develop a container-based workflow for ingesting data into postgis.<br>
Before investing more time doing those contributions, I would like to know if the maintainers of the osm2pgsql would merge contributions that offer these two features? <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/lonvia/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lonvia">@lonvia</a> <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/joto/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/joto">@joto</a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/osm2pgsql/discussions/1428#discussioncomment-483067">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AA6353TII6XPXGGDAZ4B5ILTDXKGNANCNFSM4ZD4AQLA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AA6353TTST6JMUYOIQDAVXLTDXKGNA5CNFSM4ZD4AQLKYY3PNVWWK3TUL52HS4DFWFCGS43DOVZXG2LPNZBW63LNMVXHJKTDN5WW2ZLOORPWSZGOAADV56Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/osm2pgsql/discussions/1428#discussioncomment-483067",
"url": "https://github.com/openstreetmap/osm2pgsql/discussions/1428#discussioncomment-483067",
"name": "View Discussion"
},
"description": "View this Discussion on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>