Skip to content

Commit

Permalink
Dockerfile: allow specifying s3gw directory
Browse files Browse the repository at this point in the history
When requiring the copy of the `entrypoint.sh` script, we did not
account for actions on other repositories relying on checking out the
`s3gw.git` repository and building images using the Dockerfile from
within an `s3gw` directory. This causes the script to not be found,
because it's instead in `s3gw/tools/entrypoint.sh`, versus what we
expected, `tools/entrypoint.sh`.

This helps addressing that by allowing the caller to specify on which
directory we can find the s3gw repository.

Signed-off-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
jecluis committed Nov 17, 2023
1 parent f6589aa commit 5a11d88
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ ENV LD_LIBRARY_PATH=/s3gw/lib:$LD_LIBRARY_PATH
FROM s3gw-base as buildenv

ARG CMAKE_BUILD_TYPE=Debug
ARG SRC_CEPH_DIR=./ceph

ENV SRC_CEPH_DIR="${SRC_CEPH_DIR:-"./ceph"}"
ENV SRC_CEPH_DIR=${SRC_CEPH_DIR}
ENV ENABLE_GIT_VERSION=OFF

# Needed for extra build deps
Expand Down Expand Up @@ -189,6 +190,8 @@ ARG QUAY_EXPIRATION=Never
ARG S3GW_VERSION=Development
ARG S3GW_ID=s3gw

ARG SRC_S3GW_DIR=.

ENV S3GW_ID=${S3GW_ID}
ENV S3GW_DNS_NAME=""
ENV S3GW_DEBUG="none"
Expand All @@ -208,7 +211,7 @@ COPY --from=buildenv [ \
"/srv/ceph/build/lib/libceph-common.so.2", \
"/s3gw/lib/" ]

COPY tools/entrypoint.sh /s3gw/bin/
COPY ${SRC_S3GW_DIR}/tools/entrypoint.sh /s3gw/bin/

# ports for S3 endpoints
# http: 7480
Expand Down

0 comments on commit 5a11d88

Please sign in to comment.