File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ LABEL org.opencontainers.image.source="https://github.com/fortify/fcli" \
141141RUN echo "fcli:x:10001:10001:fcli:/data:/sbin/nologin" >> /etc/passwd
142142COPY --from=fcli-downloader /tmp/fcli-bin/fcli /usr/bin/fcli
143143COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
144- COPY welcome.txt /usr/share/fcli/welcome.txt
144+ COPY welcome* .txt /usr/share/fcli/
145145RUN chmod +x /usr/local/bin/docker-entrypoint.sh
146146ADD data.tgz /
147147WORKDIR /data
@@ -173,7 +173,7 @@ LABEL org.opencontainers.image.source="https://github.com/fortify/fcli" \
173173RUN echo "fcli:x:10001:10001:fcli:/data:/sbin/nologin" >> /etc/passwd
174174COPY --from=fcli-downloader /tmp/fcli-bin/fcli /usr/bin/fcli
175175COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
176- COPY welcome.txt /usr/share/fcli/welcome.txt
176+ COPY welcome* .txt /usr/share/fcli/
177177RUN chmod +x /usr/local/bin/docker-entrypoint.sh
178178ADD data.tgz /
179179WORKDIR /data
Original file line number Diff line number Diff line change 99if [ -t 0 ] && [ $# -eq 1 ]; then
1010 case " $1 " in
1111 /bin/sh|/bin/bash|sh|bash)
12- # Display welcome message for interactive shell sessions
13- cat /usr/share/fcli/welcome.txt
12+ # Display base welcome message for interactive shell sessions
13+ # Build an `EXTRA_NOTES` env var and interpolate it into the
14+ # `${EXTRA_NOTES}` placeholder inside `welcome.txt`.
15+ EXTRA_NOTES=" "
16+ if [ -d /opt/fortify/sc-client ] && [ -f /usr/share/fcli/welcome-sc-note.txt ]; then
17+ # Prefix a blank line so the note is separated from prior text
18+ EXTRA_NOTES=" $( printf ' \n%s' " $( cat /usr/share/fcli/welcome-sc-note.txt) " ) "
19+ fi
20+
21+ # Replace literal `${EXTRA_NOTES}` placeholder with the value of
22+ # the EXTRA_NOTES variable. Using awk preserves newlines.
23+ awk -v extra=" $EXTRA_NOTES " ' { gsub(/\$\{EXTRA_NOTES\}/, extra); print }' /usr/share/fcli/welcome.txt
1424 ;;
1525 esac
1626fi
Original file line number Diff line number Diff line change 1+ Note: This image variant also includes ScanCentral Client, which can be
2+ invoked via the `scancentral` command. See `scancentral --help` or
3+ the product documentation for details. Please also see note above
4+ about packaging.
Original file line number Diff line number Diff line change @@ -23,4 +23,14 @@ Note: fcli stores session state and cache in /data (FCLI_USER_HOME).
2323 For persistent state across image invocations, mount a volume:
2424 docker run -v fcli-data:/data ...
2525
26+ Note: This image does not include any build tools, and is therefore not
27+ suitable for for packaging source code through ScanCentral Client
28+ for languages that require build tool integration. If the
29+ `scancentral package` command is being run within this container
30+ (for example through fcli `ci` or `package` actions or direct
31+ ScanCentral Client invocation), the `-bt none` option must be
32+ passed to avoid errors due to missing build tools. Depending on
33+ source code language, using `-bt none` may produce inaccurate
34+ scan results.
35+ ${EXTRA_NOTES}
2636════════════════════════════════════════════════════════════════════════════════
You can’t perform that action at this time.
0 commit comments