EspressoSystems / cape

Configurable Asset Privacy for Ethereum
https://cape.docs.espressosys.com/
GNU General Public License v3.0
97 stars 16 forks source link

Update `build-docker-wallet` to work with ubuntu docker image #944

Open sveitser opened 2 years ago

sveitser commented 2 years ago

Follow up on

sveitser commented 2 years ago

It's possible this will be enough

diff --git a/bin/build-docker-wallet b/bin/build-docker-wallet
index ad1325e..f7da7b2 100755
--- a/bin/build-docker-wallet
+++ b/bin/build-docker-wallet
@@ -7,6 +7,6 @@
 # You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.

 set -e
-build-docker-base
 cargo build --release
+patchelf --set-interpreter /lib64/ld-linux-x86-64.so.2 ./target/release/wallet-api
 docker build -t cape/wallet -f ./wallet.Dockerfile .
diff --git a/flake.nix b/flake.nix
index a99b38b..170f4be 100644
--- a/flake.nix
+++ b/flake.nix
@@ -177,6 +177,7 @@
               cacert
               mdbook # make-doc, documentation generation
               moreutils # includes `ts`, used to add timestamps on CI
+              patchelf # to make binaries built with nix work in ubuntu container
             ]
             ++ myPython
             ++ rustDeps;
Ancient123 commented 2 years ago

It may make sense for us to copy/move/rename the executable so that it doesn't impact the non-patched one and surprise people.