-
Notifications
You must be signed in to change notification settings - Fork 0
Building
Before building make sure to have the following things ready:
- Go installed
- Rust installed
-
Make installed - optional, but highly recommended since we use
make
in the further instructions
Use make build
to build the entire project.
You can use the following macros to customize the build process:
-
BUILDDIR
-make BUILDDIR=/tmp/build build
The builddir macro simply changes the directory where the build output is located at. The default location is the current directory (
.
)
You can also build only specific parts, like only the server or extras:
- Server only -
make build-server
- Container only -
make build-container
- Extras only -
make build-extra
You need to call build before calling this target.
The build output can be optimized with the optimize
target too. Currently it only uses strip
on binaries to delete unnecessary symbols and data from it. Optimizing is only really useful if you plan to share the build files or have another reason for shrink the size.
Use make optimize
to optimize it. All macros from build can also be used here.
To optimize only specific files, use one of the following targets:
- Server only -
make optimize-server
- Container only -
make optimize-container
You need to call build before calling this target.
To clean your build directory, use the clean
target. This simply deletes all build output. All macros from build can also be used here.
Just like in build, you can clean only specific parts:
- Server only -
make clean-server
- Container only -
make clean-container
- Extras only -
make clean-extra
You need to call build before calling this target.
You can specify the following macros to influence the install process:
-
DESTDIR
-make DESTDIR=/tmp install
This macro sets the root install location
-
PREFIX
-make PREFIX=/usr install
The
PREFIX
macro sets the root directory (DESTDIR
is used as prefix here as well) for all binaries and manual pages
Use the uninstall
target to uninstall docker4ssh from your system.
If you only want to run the project from source, use the run
target. This simply calls the build
target and executes the docker4ssh binary afterwards.
See the developing page.