-
Notifications
You must be signed in to change notification settings - Fork 326
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
Alpine Linux support #140
Comments
Thank you for posting here. Currently, we don't support Alpine Linux OS officially. You could find information about supported OS and installation instructions in this link: https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-prereqs.html |
Any update on adding support for Alpine? |
For anyone coming across this issue via search, here's an unofficial Dockerfile that builds and runs the agent on Alpine: https://gist.github.com/ipmb/a8213fb459c27178f88dda7149c35be2 |
@ipmb Thanks to you, I'm able to confirm that it works. But the Agent version displayed in Managed Instances is 2.3.0.0 and I couldn't use session manager, so here's how to solve it. FROM golang:1.12-alpine as builder
ARG VERSION=2.3.930.0
RUN set -ex && apk add --no-cache make git gcc libc-dev curl bash && \
curl -sLO https://github.com/aws/amazon-ssm-agent/archive/${VERSION}.tar.gz && \
mkdir -p /go/src/github.com && \
tar xzf ${VERSION}.tar.gz && \
mv amazon-ssm-agent-${VERSION} /go/src/github.com/amazon-ssm-agent && \
cd /go/src/github.com/amazon-ssm-agent && \
echo ${VERSION} > /go/src/github.com/amazon-ssm-agent/VERSION && \
gofmt -w agent && make checkstyle || ./Tools/bin/goimports -w agent && \
make build-linux
FROM alpine
RUN set -ex && apk add --no-cache sudo ca-certificates && \
adduser -D ssm-user && echo "ssm-user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ssm-agent-users && \
mkdir -p /etc/amazon/ssm
COPY --from=builder /go/src/github.com/amazon-ssm-agent/bin/linux_amd64/ /usr/bin
COPY --from=builder /go/src/github.com/amazon-ssm-agent/bin/amazon-ssm-agent.json.template /etc/amazon/ssm/amazon-ssm-agent.json
COPY --from=builder /go/src/github.com/amazon-ssm-agent/bin/seelog_unix.xml /etc/amazon/ssm/seelog.xml
CMD ["/usr/bin/amazon-ssm-agent"] Without this line, the Agent version did not seem to be recognized correctly. echo ${VERSION} > /go/src/github.com/amazon-ssm-agent/VERSION && \ |
We are consider use alpine as Fargate base container, it need this ssm-agent for troubleshooting, any advices? I tried the Docker build step before, but the agent version always show as 2.3.0.0.
I also checked the VERSION file is correct.
|
@enomotodev Hi, I found your solution works fine in 2.3.930.0, but when I upgrade to the latest 2.3.1509.0, it return back to show as 2.3.0.0. |
@ipmb @enomotodev : Thank you guys for this work. However, I am running into PATH issues for goimports. I am getting the following issue:
How did you guys fix this issue? I tried a lot to search for this error, but did not find much help online. |
Hi, did you found a workaround to get latest release running? |
@AmyZhangAmz if you don't support alpine officially, what's the harm in leaving this ticket open and allowing someone to PR changes in to add support ? Edit: I tried the above container with the following parameters
And I was able to reproduce the version issue
I tried using
This is too bad as the packer docker container uses alpine and it would have been nice to be able to use this binary directly in that container. Now we'll have to create an unofficial docker image based on centos or ubuntu just to use the |
Any news on an official support for Alpine Linux? |
Bump |
Any news on an official support for Alpine Linux so far? |
Trying to setup ansible + AWS session manager... Same issues... Alpine support would be useful |
Can this ticket be reopened? A lot of docker images are based on Alpine and extending these images to support the AWS Session Manager would be made way more easy by adding support for Alpine |
Hi @TarSzator, did you try to use ECS Exec, it should be a better way to do this job. Please checkout this document https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html |
@axot For that I need the SSM :-) Did I overlooked something that I can use ECS Exec without AWS SSM? |
@TarSzator I think you don't need install ssm agent into container, I tested with fargate 1.4.0. It works fine. Please also check this blog. https://aws.amazon.com/blogs/containers/new-using-amazon-ecs-exec-access-your-containers-fargate-ec2/. It will mount ssm agent from host side(aws/containers-roadmap#1050). |
@axot did you really test with Alpine Linux? Since it is based on musl i dont think that the mounted SSM agent is working. But it would be really cool if that works out of the box. |
@apachler Yes, it works out of box. |
Now that AWS Inspector v2 has enhanced ECR scanning, I've noticed that my alpine linux containers, which I run for most of our prodution apps, do not work with the scanning. I believe adding SSM to these images would make them scannable, but I don't want to change distros away from alpine, which I believe to be easier to secure, just to add a less-secure distro that has SSM built-in, if that makes sense. So I think this ticket is worth reconsidering with the recent changes. |
For me mount ssm agent host from side works only in Alpine 3.14, Alpine 3.15 not work... |
Hello folks, I am going to share with you the work-around that I just used and deployed. This is now allowing me to use a new functionality provided by SSM: WarningNot sure what kind of side effects this may cause, I just tested this for my limited use-case. @aws: Please provide a proper solution! The problemBefore putting this hack in place (yes it's very much a hack...) I was blocked by an error always asking me to update to a newer version, while I was running on the last one... like you the version returned was always the major one (in my case
Like you, my agent was always returning the major version: The "solution"Add a
Note: Obviously replace My
My agent is now returning the correct version, I can use the new feature from SSM |
Hi,
can be SSM agent installed on Linux Alpine OS? Ther's a supported version?
The text was updated successfully, but these errors were encountered: