-
Notifications
You must be signed in to change notification settings - Fork 214
Add elastic-agent-wolfi-complete Docker image
#5475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cec25d6
6c3e73b
e7e69e7
6d9ad70
c5f27e2
dddf774
db04f2e
0d4733b
a032bb2
0f354a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -118,7 +118,7 @@ LABEL \ | |
| license="{{ .License }}" \ | ||
| description="{{ .BeatDescription }}" | ||
|
|
||
| ENV ELASTIC_CONTAINER "true" | ||
| ENV ELASTIC_CONTAINER="true" | ||
| ENV PATH={{ $beatHome }}:$PATH | ||
| ENV GODEBUG="madvdontneed=1" | ||
|
|
||
|
|
@@ -192,7 +192,7 @@ RUN echo \ | |
| ENV ELASTIC_SYNTHETICS_CAPABLE=true | ||
| ENV ELASTIC_AGENT_COMPLETE=true | ||
| ENV TZ=UTC | ||
| ENV NODE_VERSION=18.20.3 | ||
| ENV NODE_VERSION=18.20.4 | ||
| ENV PATH="$NODE_PATH/node/bin:$PATH" | ||
| # Install the latest version of @elastic/synthetics forcefully ignoring the previously | ||
| # cached node_modules, heartbeat then calls the global executable to run test suites | ||
|
|
@@ -239,8 +239,38 @@ RUN for iter in {1..10}; do \ | |
| (exit $exit_code) | ||
| {{- end }} | ||
|
|
||
| {{- if (and (eq .Variant "wolfi-complete") (contains .from "wolfi")) }} | ||
| USER root | ||
| # Install required dependencies from wolfi repository | ||
| RUN for iter in {1..10}; do \ | ||
| apk update && \ | ||
| apk add --no-interactive --no-progress --no-cache nodejs-18=18.20.4-r0 npm=10.8.3-r0 glib dbus-glib libatk-1.0 \ | ||
| libatk-bridge-2.0 cups-libs libxcomposite libxdamage libxrandr libxkbcommon pango alsa-lib \ | ||
| font-opensans fontconfig gtk icu-data-full libnss mesa font-noto-cjk font-noto-emoji && \ | ||
| exit_code=0 && break || exit_code=$? && echo "apk error: retry $iter in 10s" && sleep 10; \ | ||
| done; \ | ||
| (exit $exit_code) | ||
|
|
||
| # Setup synthetics env vars | ||
| ENV ELASTIC_SYNTHETICS_CAPABLE=true | ||
| ENV TZ=UTC | ||
| ENV NPM_CONFIG_PREFIX={{ $beatHome }}/.npm | ||
| ENV PATH="$NPM_CONFIG_PREFIX/bin:$PATH" | ||
|
|
||
| RUN echo \ | ||
| $NPM_CONFIG_PREFIX \ | ||
| {{ $beatHome }}/.config \ | ||
| {{ $beatHome }}/.synthetics \ | ||
| {{ $beatHome }}/.npm \ | ||
| {{ $beatHome }}/.cache \ | ||
| | xargs -IDIR sh -c 'mkdir -m 0770 -p DIR && chown -R {{ .user }} DIR' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we can keep the permission in sync with the other PR - https://github.com/elastic/beats/pull/40689/files#r1750771988
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I have not seen the original comment https://github.com/elastic/beats/pull/40689/files#r1750771988 and thought it was a typo which I "fixed" in elastic/beats@b06f7ce I think I need more context on how switching permissions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think @emilioalvap would be the right person to ask in this case 🙂 |
||
|
|
||
| USER {{ .user }} | ||
|
|
||
| RUN (npm i -g --loglevel verbose --production --engine-strict @elastic/synthetics@stack_release || sh -c 'tail -n +1 ${NPM_CONFIG_PREFIX}/_logs/* && exit 1') | ||
| {{- end }} | ||
|
|
||
| USER {{ .user }} | ||
|
|
||
| {{- range $i, $port := .ExposePorts }} | ||
| EXPOSE {{ $port }} | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.