Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Building

ByteDream edited this page Dec 19, 2021 · 3 revisions

Preparation

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

Build

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 (.)

Build specific parts

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

Optimize

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.

Optimize specific parts

To optimize only specific files, use one of the following targets:

  • Server only - make optimize-server
  • Container only - make optimize-container

Clean

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.

Clean specific parts

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

Install

You need to call build before calling this target.

Call make install to install docker4ssh on your system.

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

Uninstall

Use the uninstall target to uninstall docker4ssh from your system.

Run

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.

Develop

See the developing page.

Clone this wiki locally