Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bindings/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ if(NOT WIN32)
# do not set RPATH for mako
set_property(TARGET mako PROPERTY SKIP_BUILD_RPATH TRUE)
target_link_libraries(mako PRIVATE fdb_c fdbclient fmt::fmt Threads::Threads fdb_cpp boost_target rapidjson)
if(NOT OPEN_FOR_IDE)
strip_debug_symbols(mako)
endif()

if(NOT OPEN_FOR_IDE)
# Make sure that fdb_c.h is compatible with c90
Expand Down
25 changes: 25 additions & 0 deletions packaging/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,31 @@ ENV FDB_CLUSTER_FILE_CONTENTS=""
ENV FDB_PROCESS_CLASS=unset
ENTRYPOINT ["/usr/bin/tini", "-g", "--", "/var/fdb/scripts/fdb.bash"]

FROM foundationdb-base AS mako

ARG FDB_VERSION=7.3.63
ARG TARGETARCH
COPY website/${FDB_VERSION}/mako.* /tmp/
RUN if [ "$TARGETARCH" = "amd64" ]; then \
FDB_ARCH=x86_64; \
elif [ "$TARGETARCH" = "arm64" ]; then \
FDB_ARCH=aarch64; \
else \
echo "ERROR: unsupported architecture $TARGETARCH" 1>&2; \
exit 1; \
fi; \
cp "/tmp/mako.${FDB_ARCH}" /usr/bin/mako && \
chmod +x /usr/bin/mako && \
rm -rf /tmp/*
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth noting that this rm doesn't save any space, because these files were added in the previous layer (directive). But I don't see a better way 🤷


RUN mkdir -p /var/log/fdb-trace-logs && \
chown -R fdb:fdb /var/log/fdb-trace-logs
USER fdb
WORKDIR /var/fdb
ENV FDB_CLUSTER_FILE=/var/fdb/fdb.cluster
ENV LD_LIBRARY_PATH=/var/dynamic-conf/lib/
ENTRYPOINT ["/usr/bin/mako"]

FROM foundationdb-base AS ycsb

RUN microdnf -y install \
Expand Down
7 changes: 7 additions & 0 deletions packaging/docker/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ function create_fake_website_directory () {
fi
local stripped_binaries_and_from_where="${1}"
fdb_binaries=( 'fdbbackup' 'fdbcli' 'fdbserver' 'fdbmonitor' )
if [ "${BUILD_MAKO:-0}" -eq 1 ]; then
fdb_binaries+=( 'mako' )
fi
logg "PREPARING WEBSITE"
website_directory="${script_dir}/website"
rm -rf "${website_directory}"
Expand Down Expand Up @@ -208,6 +211,7 @@ function build_and_push_images () {
[ "${image}" == 'foundationdb-kubernetes-sidecar' ] || \
[ "${image}" == 'fdb-aws-s3-credentials-fetcher-sidecar' ] || \
[ "${image}" == 'ycsb' ] || \
[ "${image}" == 'mako' ] || \
[ "${image}" == 'fdb-kubernetes-monitor' ]; then
tags_to_push+=("${image_tag}")
fi
Expand Down Expand Up @@ -262,6 +266,9 @@ image_list=(
'foundationdb-kubernetes-sidecar'
'ycsb'
)
if [ "${BUILD_MAKO:-0}" -eq 1 ]; then
image_list+=( 'mako' )
fi
registry=""
tag_base="foundationdb/"

Expand Down