[SERVER-36790] Add build for Linux Alpine Created: 21/Aug/18  Updated: 03/Jul/23  Resolved: 10/May/23

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Pavel Chertorogov Assignee: Alex Ettouati
Resolution: Won't Fix Votes: 13
Labels: platform-request
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Microsoft Word Scan results with mongo encryption and dependancies.docx     Microsoft Word Scan results without mongo encryption and dependancies.docx    
Issue Links:
Depends
is depended on by PHPC-1555 Add Alpine Linux to the operating sys... Closed
Related
related to SERVER-49140 [FLE] Add mongocryptd for Linux Alpine Closed
Assigned Teams:
Server Development Platform
Participants:
Case:

 Description   

Many developers want to use MongoDB under Linux Alpine image with easy setup/installation. Eg for testing purposes.

For now Linux binaries https://www.mongodb.org/dl/linux does not have such ready to run binaries under Alpine. Will be great if you add such build.

Related topics: 
https://stackoverflow.com/questions/32724556/execute-mongodb-binaries-on-alpine-linux
https://github.com/nodkz/mongodb-memory-server/issues/32 



 Comments   
Comment by Alex Neben [ 10/May/23 ]

This should be addressed as part of the platform policy. Currently alpine linux is not on it. I need someone from product to tell me how important this is. Closing unless product wants to prioritize this.

Comment by Rishabh Bisht [ 06/Apr/23 ]

Hi cristopher.stauffer@mongodb.com, do we know what's the status for this request? Is this on the near term roadmap? Thanks. 

Comment by Norman Schöeneich [ 18/Dec/19 ]

We also tried the new feature "Client-Side Field Level Encryption". First we are looking for an implementation of mongocryptd for alpine linux. But unfortunately we did not find any support for alpine.

Lack of alpine linux support, we tried Debian. But neither version "Buster" nor previous stable version "Stretch" were ready for us, because they still contain numerous security issues / CVEs.

So we +1 for alpine support.

Comment by Brady Mitchell [ 05/Sep/19 ]

Any chance this may be done now that Alpine no longer maintains a package for mongodb?

Comment by Pavel Chertorogov [ 26/Aug/18 ]

1) I say that docker is optional. Testing should work without it.

2) I'm using exactly this builds, but they do not contain Alpine builds. Can you add them there? It solves all problems.

Thanks.

Comment by Matt Lord (Inactive) [ 25/Aug/18 ]

Hi pavel.chertorogov@gmail.com,

  1. Is using Docker an option? This sounds like a case almost tailor made for it.  
  2. You can see all of the Linux download files here. That could potentially meet a lot of your needs stated above. But let me know. 

Best Regards

Comment by Pavel Chertorogov [ 25/Aug/18 ]

Hi, Matt.

I'm providing OSS library for testing code which works with MongoDB on NodeJS. For now, https://github.com/nodkz/mongodb-memory-server is a recommended lib for parallel testing with Jest and AVA. It launches fresh mongod in memory on custom port for every test file, so tests may be run in parallel. Yep, it spends around several seconds for startup, but most users obtain 3x speed improvement with parallel testing all their tests.

It perfectly works on Mac, Win, Ubuntu, Debian and some other *nix, also works on CI (with zero configs). For first run, it downloads tar with binaries, extract only `mongod` and put it in some user home directory. All further runs launch this binary. With such a simple scenario user or CI may not have installed mongo on the system, only what needs to do - just run tests and all "magic" happens under the hood.

Developers may provide any version of MongoDB for their test. Even more, launch different versions of MongoDB simultaneously for one test file:

const mongod = new MongodbMemoryServer({
  binary: {
    version?: string, // by default 'latest'
  },
});
 
const mongod1 = new MongodbMemoryServer({ binary: { version: 'latest' } });
const uri1 = await mongod1.getConnectionString();
// mongodb://localhost:51139/bfde2288-e472-49ad-a111-43d757b3f323
 
const mongod2 = new MongodbMemoryServer({ binary: { version: '3.6.4' } });
const uri2 = await mongod2.getConnectionString();
// mongodb://localhost:51140/0dd09eaf-ce28-40e9-a9db-7fd95cfa4879
 
const mongod3 = new MongodbMemoryServer({ binary: { version: '3.4.2' } });
const uri3 = await mongod3.getConnectionString();
// mongodb://localhost:51149/01ee8f50-4ecc-4661-9263-f9c97666c9aa

What I want to obtain:

  • The list of URLs where I can download `tar`s via CURL (without working with package managers)
  • The constant URL for downloading the `latest` version
  • The wider variety of MongoDB versions (this is not required, but will be good for end developers). I will be happy even one working version per branch.
Comment by Matt Lord (Inactive) [ 24/Aug/18 ]

Hi pavel.chertorogov@gmail.com

Did you have any particular problems with the MongoDB packages in the Alpine Linux repos: 3.6 and 4.0? I'm wondering if the pains/desires are related to:

  1. Having a wider variety of MongoDB versions available in Alpine Linux package repos
  2. Using MongoDB Enterprise binaries on Alpine Linux
  3. Delays between MongoDB releases and Alpine Linux repo package updates (e.g. when MongoDB 4.0.2 is released)
  4. Commercial support for MongoDB 
  5. Something else?

One option is for MongoDB to make e.g. Alpine Linux 3.8 on x86_64 an officially supported platform.
Another would be for us to work with the Alpine Linux package maintainer(s) to address any other user concerns/desires.

The more optimal path depends on the underlying pains we're trying to address here.

Thank you for using MongoDB!

Generated at Thu Feb 08 04:44:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.