Solvedpostgrest Docker image compatible with ARM: is that possible?

Environment

  • PostgreSQL version: postgres:10.4
  • PostgREST version: v0.5.0.0
  • Operating system: Raspbian GNU/Linux 9 (stretch)
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Description of issue

Probably related to #846, but I would like to ask about the possibility of a Docker image ready for ARM processors. So far I think the PostgREST Docker image is not compatible:

pi@raspberrypi:~ $ docker pull postgrest/postgrest
Using default tag: latest
latest: Pulling from postgrest/postgrest
Digest: sha256:8c40ba14f6400a51be1ed78f83f472132a96ab955fe627ca385286378dd3f88b
Status: Image is up to date for postgrest/postgrest:latest
pi@raspberrypi:~ $ docker run postgrest/postgrest


standard_init_linux.go:190: exec user process caused "exec format error"

Also I see only amd64 in the image inspector:

pi@raspberrypi:~ $ docker inspect postgrest/postgrest | grep Architecture
        "Architecture": "amd64",

Is this possible and in the radar for short term releases? Is there someway I could help in this particular issue?

50 Answers

βœ”οΈAccepted Answer

@hughjfchen Could you please share the build details?
I have a scaleway Arm64 server and I could setup a CI build on it.

I've been building the postgrest docker images for aarch64 recently. You can use it by pulling the images from my docker.io repos:
docker pull hughjfchen/hughjfchen:postgrest-aarch64-5.2.0
or:
docker pull hughjfchen/hughjfchen:postgrest-aarch64-6.0.2

If you want to play around with my build process, I have a github repos which builds the above images with my home-made shell-script-based CI/CD framework. You can build on your scaleway arm64 instance with following steps:

  1. make sure you have an account which can use sudo without password
  2. clone my github repos with the command: git clone https://github.com/hughjfchen/postgrest-docker
    3.build the images with one of the following commands:
    postgrest-docker/postgrest-6.0/DevOps/scaleway/test/cb.sh, or
    postgrest-docker/postgrest-5.2/DevOps/scaleway/test/cb.sh
    4.once finished, you can find the nix derivation result under the postgrest-docker/postgrest-6.0 or postgrest-docker/postgrest-5.2 directory respectively.

Other Answers:

On my system (latest Dockerhub image of ubuntu:20.04) I got this while running the nightly aarch64 from postgrest-nightly-2021-01-25-18-38-c93e8f9-ubuntu-aarch64.tar.xz:

postgrest: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory

apt install libnuma-dev resolved this. Just reporting here for the record.

Compiled version on Raspberry Jessie

postgrest.tar.xz.zip

Marcello

Related Issues:

4
postgrest Docker image compatible with ARM: is that possible?
@hughjfchen Could you please share the build details? I have a scaleway Arm64 server and I could set...
3
postgrest Why aren't "OR" conditions currently supported?
I'm not sure how to feel about this On one hand OR is important but to support it you can no longer ...
124
graphql engine relay support
Hi @srghma @toxsick relay makes assumptions about the GraphQL server as outlined here We haven't mad...
32
graphql engine Support for Mac M1
Hey folks Sorry for the radio silence on the thread from the Hasura team Add Hasura Support for Mac ...
30
graphql engine Handling multiple roles on the graphql client (possibly in the same query)
@shahidhk .. my understanding of the current JWT role workflow is: The token is decoded ...
23
graphql engine create hasura adapter for react-admin
@supriyanta @EmaSuriano @jasonmorganson @evcodes @Pomazan-Bogdan @ptrobert @eaverdeja @mnlbox We hav...
21
postgraphile Adding subscriptions
Super excited to announce that we just released 4.4.0-alpha.0 which includes OSS subscriptions and l...
18
postgraphile document how to do a mutation
I set up the superb forum_example tutorial and thanks to Graphiql autocomplete (which mostly worked)...
17
graphql engine Review and verify guide on Auth0 JWT Integration
You can (and should) use an access token and it's not too difficult: configure an API in your Auth0 ...
16
postgraphile Where JWT token is read from and how to use it with GraphiQL?
However In the documentation it says: After a JSON Web Token has been verified and decoded ...
15
graphql engine cli exits with "Killed: 9" (MacOS 11 aka Big Sur)
@cakemountain there was a new version released which should fix the problem I'm assuming this issue ...
14
graphql engine managing seed or data-only migrations
@marionschleifer Thank you for the prompt response :) You can add the SQL (with insert statements) a...
14
graphql engine Data in enum tables should be tracked in console-generated migrations
To add to this it would be great if hasura migrate create init --from-server would also include the ...
10
graphql engine [Question] Insert multiple objects at once with variables
@divramod You can change your variables input to be the object type and it should be fine after that...
5
graphql engine JWT nested scopes currently not supported on AWS Cognito / Lambda
@willmitchell @romcok @Nomad-Go We have added support for stringified JSON in Hasura claims section ...
4
postgraphile Feature Request: Batch query support
To answer myself---I found the following solution works: PostgresQL setup: GraphQL query: ...
3
postgraphile "disableDefaultMutations" disable all mutations?
The issue does not lie in SQL - I was talking about allowing custom mutations to utilise the FooPatc...
416
pyodbc pip install pyodbc failing: error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory #include <sql.h> ^ Your machine do...
392
psycopg2 psycopg2-binary fails to install on macOS Big Sur 11.0.1 and Python 3.9.0 (with possible workaround)
Actually figured it out Haven't worked on a Mac in a while and forgot about the PostgreSQL dependenc...
326
psycopg2 Installing psycopg2-binary with Python:3.6.4-alpine doesn't work
I found this solution which worked quite fine Edit The above compiles the package from source so I w...
246
sheetjs How to simply export a Worksheet to xlsx?
There are two issues: each object is mapped to a row so if you want a row with name John and city Se...
202
pyodbc fatal error: sql.h: No such file or directory
You don't have the required ODBC header files on your machine For example on Ubuntu you would need t...
162
react native firebase πŸ”₯(Android) Program type already present: io.invertase.firebase.BuildConfig
I think I found my ultimate error here In my package.json file I had at some point earlier ...
161
typeorm Error: RepositoryNotFoundError: No repository for [Enitity] was found. Looks like this entity is not registered in current "default" connection?
https://typeorm.io/#/connection-options/common-connection-options Issue type: [x] question [x] bug r...
160
dbal Unknown database type enum, MySQL57Platform may not support it
In case anyone else comes across this and is similarly dismayed by the complexity of the solutions o...
158
dbeaver "invalid privatekey" connecting through SSH tunnel
Run this on your key to convert it to RSA private key Helped me ssh-keygen -p -m PEM -f ~/.ssh/id_rs...
135
realm swift Realm/RLMArray.h file not found and Could not build Objective-C module 'Realm'
So I am a little ashamed that I didn't try this earlier but it appears that if I run Clean Build Fol...
130
prisma Prisma Migrate: Error creating shadow database
I just want to add a quick note for folks coming here from googling the error message that if you ar...
124
efcore No executable found matching command "dotnet-ef" even after adding CLI
I has this issue and like to share I want to Migrate my Database with Models I am using EF Core 2.0 ...
120
laravel backup Target [Spatie\Backup\Tasks\Cleanup\CleanupStrategy] is not instantiable while building
I found that ensuring the package is removed: composer remove spatie/laravel-backup clear the cache ...
116
efcore UseSqlServer() method is missing from Microsoft.EntityFrameworkCore.SqlServer 1.1.1
Hm - try manually adding the using statement using Microsoft.EntityFrameworkCore; and building again...
111
Flask Migrate flask db init fails: KeyError 'migrate'
Hi fieldse Did you create a Migrate object? I get the same error when trying flask db init without t...
104
react native firebase πŸ”₯ Version mismatch causing app termination
Looks like GoogleAppMeasurement gets imported as a dependency with version 5.3.0 A simple addition t...
100
react native firebase onNotificationOpened not working on Android (background/foreground)
Solved the issue only on background using @ZardozSpeaks approach Under my SplashActivity.java ...
87
psycopg2 psycopg2-binary: Why?
But not all depends from me I use different third-party packages which already has psycopg2 or psyco...
82
react native firebase Firebase dependency updates are required to fix gradle v4+ builds
@DeepaSriramRR as a temporal workaround you can disable version check of the Google plugin At the en...
82
react native firebase AndroidX support
Play Services just shipped AndroidX breaking changes - if you must upgrade your android Firebase SDK...
80
react native firebase RNFirebase core module was not found natively on ios
I will just leave it here in case someone comes and it's still struggling with this ...
79
sheetjs Doesn't work with browserify or webpack.
I was able to get it building by adding the following to my webpack config: EDIT: please raise a new...
78
dbeaver Postgres connection error
@lcustodio on the SSL page set SSL mode: require and either leave the SSL Factory blank or use the o...
78
typeorm Relation decorators: allow to pass string instead of typeFunction
PR is submitted As an example Issue type: [ ] question [ ] bug report [x] feature request [ ] docume...
76
typeorm How to get foreign key for instance?
You can't do that because your group is relation object its not a simple number (id of the pricetagg...
71
typeorm MissingDriverError: Wrong driver: "undefined" given.
solved it by export the config this way in my ormconfig.ts: Issue type: [ ] question [X] bug report ...
70
dbal [2.10.0] Do not add CHARACTER SET for some column types
I solved my errors in the migration files adding ->charset(null) Bug Report Q A BC Break no Version ...
66
dbal Doctrine\DBAL\Exception\InvalidFieldNameException when working with DB schema on PostgreSQL 10
Suggested solution: PostgreSqlSchemaManager.php line 292: to : Since upgrading to PostgreSQL 10 I ha...
64
react native firebase [πŸ“š] AdMob - use @invertase/react-native-google-ads
Just FYI we're getting close here AdMob documentation availability Hi there! I've noticed that AdMob...
64
typeorm .save() is throwing duplicate key value violates unique constraint
I can confirm that this problem still exists I'm using typeorm with postgres. Issue type: [x] questi...
64
typeorm Error: Entity metadata was not found
I ran into the same issue TypeORM is very difficult to debug with args and meta data classes/collect...
63
react native firebase [SOLVED with v2.1.1] Undefined symbols for architecture x86_6: _OBJC_CLASS_$_RNFirebaseDatabaseReference
Okay.. if anybody comes accross this magic error try this It solved the problem (for now) Close Xcod...
62
typeorm WHERE, Date, and BETWEEN
It appears that there is a bug with how QueryBuilder is handling dates I only tested with SQLite ...