No Branch/Tag Specified
main
s3
fix-delete-user
timeline-cli
blog-title
signature
remove-dup-images
ldap-non-anon
drone-ci
DearRude/force-lang
igalic/go/async-all-mut
go/async
floreal/translations-update
missing-docs
RAOF/fix-arm64-build
epsilon-phase/authorized-fetch
upgrade
improve-the-editor-once-again
igalic/feat/custom-fairing-domains
feature/ldap
test/dotenv_error
fix-mobile-margin
0.7.2
0.7.0
0.2.0-alpha-1
0.3.0-alpha-2
0.4.0-alpha-4
0.5.0
0.6.0
0.7.1
Labels
Clear labels
Related to the REST API
Code running on the server
Stuff related to Federation
Related to the front-end
Translations, and related code
More about project management or code than the project itself
The building, or installation process of Plume
Something isn't working
We need to talk
New feature or request
This is a new feature
Compatibility with different browsers, readers and OS
Related to an external package that Plume uses
UI/UX related issues and PRs
Good for newcomers
Extra attention is needed
Issues affecting only mobile UX
How elements're rendered out for the end user
Something else needs to be fixed first
This issue or pull request already exists
This PR is not complete yet
Issues concern a limited number of instances
This doesn't seem right
Need to be discussed by the community (on Loomio)
This PR is ready to be reviewed
Proposed ideas worth considering
This is issue has been created after a vote on Loomio
This will not be worked on
Apply labels
A: API
Related to the REST API
A: Backend
Code running on the server
A: Federation
Stuff related to Federation
A: Front-End
Related to the front-end
A: I18N
Translations, and related code
A: Meta
More about project management or code than the project itself
A: Security
Build
The building, or installation process of Plume
C: Bug
Something isn't working
C: Discussion
We need to talk
C: Enhancement
New feature or request
C: Feature
This is a new feature
Compatibility
Compatibility with different browsers, readers and OS
Dependency
Related to an external package that Plume uses
Design
UI/UX related issues and PRs
Documentation
Good first issue
Good for newcomers
Help welcome
Extra attention is needed
Mobile
Issues affecting only mobile UX
Rendering
How elements're rendered out for the end user
S: Blocked
Something else needs to be fixed first
S: Duplicate
This issue or pull request already exists
S: Incomplete
This PR is not complete yet
S: Instance specific
Issues concern a limited number of instances
S: Invalid
This doesn't seem right
S: Needs Voting/Discussion
Need to be discussed by the community (on Loomio)
S: Ready for review
This PR is ready to be reviewed
Suggestion
Proposed ideas worth considering
S: Voted on Loomio
This is issue has been created after a vote on Loomio
S: Wontfix
This will not be worked on
No Label
A: API
A: Backend
A: Federation
A: Front-End
A: I18N
A: Meta
A: Security
Build
C: Bug
C: Discussion
C: Enhancement
C: Feature
Compatibility
Dependency
Design
Documentation
Good first issue
Help welcome
Mobile
Rendering
S: Blocked
S: Duplicate
S: Incomplete
S: Instance specific
S: Invalid
S: Needs Voting/Discussion
S: Ready for review
Suggestion
S: Voted on Loomio
S: Wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Assignees
Assign users
Clear assignees
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
No dependencies set.
Reference: Plume/Plume#871
Reference in New Issue
There is no content yet.
Delete Branch '%!s(<nil>)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
Hi,
would be nice to have a static build without dependencies.
I'm build on alpine which fails.
Have anyone finished a musl based static build of plume?
I use these scripts to build binaries:
Do they help you though they use a Debian Docker image?
I tried to build it with musl target, but instead I think it still try to use the wrong target?!
Tried Debian base and that builder tool: https://github.com/emk/rust-musl-builder
I'm new with compiling binaries and rust, but I know x86_64-unknown-linux-musl is installed...
What about running blow?
You might have to run
cargo install
under Plume directory. Plume project hasrust-tookchain
file which specifies Rust version.Sorry, not
cargo install
butrustup target install
.rust-toolchain file...
I'll test it again with file
rust-toolchain
removed. Thanks for pointing me to that file...I mean doing
Sorry for my unclear instruction.
If you succeeded to build, it's ok. But if not, I did mean
rust-toolchain
rustup target install ...
rust-toolchain
specifies a Rust version, not a build target. I guess installing musl target under Plume directory which hasrust-tookchain
downloads suitable Rust version for musl target. But I cannot try it because I'm not i front of computer now. Just guessing.Don't understand way the rustup target install should help? It's installed before:
Also tried your last instruction (keep rust-toolchain file, install target), but looks like it still ignores musl?
If a remove the rust-toolchain file it use the expected target / toolchain, but fails later during build.
Ah, more my mistake...
This means:
x86_64-unknown-linux-gnu
) binariesYou're right. I was wrong.
What's about to run?
With
rust-toolchain
file--target x86_64-unknown-linux-musl
will be ignored. With file removed I get an error:hmm... I have no idea. Will try myself later.
Thanks! I think something is wrong with my build...
Static release would be nice and much more portable.
After some errors, finally I finished successfully! The point is to use a Docker image of nightly Rust.
nightly-2020-01-26-openssl11
tag just because it's near to our rust-toolechainnightly-2020-01-15
. More later versions might worksudo apt update -y && sudo apt install -y gettext
cargo build --release --no-default-features --features=postgres --target=x86_64-unknown-linux-musl
I got static build of Plume!
I hope this may help you.
we might wanna update our toolchain file
i am looking forward to being able to just use stable rust once we migrate to rocket 0.5
Yes. I'm looking forward to Rocket 0.5 release.
Compile static
plume
binary works fine!Also a
static
directory was created, which should be needed to for a minimal docker image.I think I need to build the plume-cli binary too?
update
Oh, it isn't static!
Created a Dockerfile, but isn't final. Need to be multistage if static build works fine...
used build-arg
FEATURES=sqlite
According to rust-musl-builder's README, you might not have to install SQLite3 by yourself (although I'm not sure).
Hi,
I don't understand way and haven't the experience to compile plume as static binary. I think I'll just bundle the dependencies with my docker image until that problem could be solved...
Details later...
Used plume Dockerfile with modifications in first stage and a
from scratch
final stage.musl musl-dev musl-tools libsqlite3-dev libssl-dev
)RUN rustup target add x86_64-unknown-linux-musl
--target=x86_64-unknown-linux-musl
static/
and binaries to/out
from scratch
, but for example ca-certificates need to copied from build stage.build-arg
to be flexiblestrip
for both binaries which reduces the binary sizeGreat!
I need to add some dependencies to the final Image and some tests are needed. I'll post a modified dockerfile soon...
Need help to optimize the config part of the entrypoint script and test the stability of the static build.
Final stage misses the dependencies:
Needed / used dependencies alpine based:
Full Dockerfile
entrypoint script
Quick and dirty script to initialize plume...
Tested with sqlite.
Are you interested to modify your Docker image to be static with an (improved) entrypoint script?
Build works fine with sqlite, but fails with
--build-arg FEATURES=postgres
. I think a postgres dependency is missing...Yes, I think it's nice if Docker image size is reduced. Once you think your Dockerfile and starter script is enough well, can you make a pull request? Then I will review in detail again (this does not mean I don't see scripts here. But now I'm seeing them roughly).
I'm new with git and need to take a look how to make a pull request... Just worked in my shell to create the Dockerfile and entrypoint script. But I'll take a look.
Before I create a PR I'd try to fix the problem with the postgres version. Any idea about the cause of that error for postgres version (
FEATURE=postgres
) compared to the successfully finished sqlite version (FEATURE=sqlite
)?openssl should also be needed for sqlite I think? So it should be related to a postgres dependency?
sqlite compiles without errors. Static sqlite image:
It seems to be related to openssl / diesel / postgres.
Take a look here:
Tried to add openssl-probe as described here https://crates.io/crates/openssl-probe in main.rs and Cargo.toml.
Compiled with the same error and found
plume-models/src/lib.rs
and also added it there before diesel and to Cargo.toml.Also (re-)installed ca-certificates and ssl-cert just to be sure... but postgres still fails to compile. So only sqlite runs statically for now!
Additional to the postgres compile error there is a frontend error message in web developer tools... Don't know if I'm able to fix the two problems myself...
#887