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
[Functionbeat] Docker #15112
Comments
@andresrc I would also like to have a docker image for Functionbeats.
My Dockerfile looks like below.
|
The working Dockerfile looks like this -
|
Thank you for sharing! |
I got error "Missing pkg/functionbeat-aws" for above dockerfile, so i fix it for current version |
I get the following error each time:
I pass the AWS credentials into the container as environment variables. Locally (without Docker Image), the deployment works with my credentials. This is my docker run -it --rm \
-v $(pwd)/config:/functionbeat/config:ro \
--env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
--env AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
--env AWS_SECURITY_TOKEN=$AWS_SECURITY_TOKEN \
--env AWS_REGION=eu-central-1 \
--env AWS_DEFAULT_REGION=eu-central-1 \
myorga/functionbeat:latest \
deploy functionbeat -c /functionbeat/config/functionbeat.yml -e -v -d "*" I have no idea what I am doing wrong. I also have the problem with the above Dockerfile. |
Pinging @elastic/integrations-services (Team:Services) |
Together with @mmathea-ep we could now solve the problem and build a running Docker Image. Apparently Python is required for the This is our Dockerfile: FROM python:3.7.9-slim-buster as functionbeat-download
ENV FUNCTIONBEAT_VERSION=7.8.1
ENV FUNCTIONBEAT_PACKAGE=functionbeat-${FUNCTIONBEAT_VERSION}-linux-x86_64
ADD https://artifacts.elastic.co/downloads/beats/functionbeat/${FUNCTIONBEAT_PACKAGE}.tar.gz /tmp
RUN mkdir -p /functionbeat && \
tar -xvf /tmp/${FUNCTIONBEAT_PACKAGE}.tar.gz --strip 1 -C /functionbeat
FROM python:3.7.9-slim-buster
RUN addgroup functionbeat \
&& useradd -g functionbeat --no-create-home functionbeat
USER functionbeat
ENV PATH /bin/functionbeat:$PATH
ENTRYPOINT ["/bin/functionbeat"]
CMD ["help"]
WORKDIR /functionbeat
VOLUME ["/functionbeat/config"]
COPY --from=functionbeat-download /functionbeat/functionbeat /bin/functionbeat
COPY --from=functionbeat-download /functionbeat/pkg/functionbeat-aws /functionbeat/pkg/functionbeat-aws You can run it via: docker run -it --rm \
-v $(pwd)/config:/functionbeat/config:ro \
--env AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
--env AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN \
--env AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION \
{{ DOCKER IMAGE }} \
deploy {{ FUNCTIONBEAT_NAME }} -c /functionbeat/config/functionbeat.yml -e -v -d "*" Starting from your current directory the folder |
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Hi! We're labeling this issue as |
Hello,
we want to deploy functionbeat changes via our CI/CD pipeline. Our idea was to run a small docker container to execute functionbeat commands instead of downloading the functionbeat binary for the right platform.
Can you provide a docker image for functionbeat as well like for all other beats?
Best regards,
Christian
The text was updated successfully, but these errors were encountered: