Last active
October 25, 2024 23:39
-
-
Save CodaBool/fd6ba2d6da40c7beaf6e789657446d42 to your computer and use it in GitHub Desktop.
AL2 lambda with a Go github release
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM public.ecr.aws/lambda/provided:al2 | |
# there is a https://hub.docker.com/r/microsoft/mssql-tools image but it does not have the lambda runtime | |
# there likely is a way to install using the microsoft yum/Fedora repo | |
# but this AL2 does not have yum-config-manager | |
# which makes it difficult to add GPG keys | |
ARG VERSION=v1.8.0 | |
# install tar and bzip to decompress archive | |
RUN yum install -y tar bzip2 && yum clean all | |
# RUN curl -L -O https://github.com/microsoft/go-sqlcmd/releases/latest/download/sqlcmd-linux-amd64.tar.bz2 | |
# download & verify checksum | |
# https://github.com/microsoft/go-sqlcmd/releases/ | |
ADD --checksum=sha256:f748fa33eae645db1e05a07d990d0d2a8025cd319b6f7f0461e00eed18c865b4 \ | |
https://github.com/microsoft/go-sqlcmd/releases/download/$VERSION/sqlcmd-linux-amd64.tar.bz2 \ | |
sqlcmd-linux-amd64.tar.bz2 | |
RUN tar -xvjf sqlcmd-linux-amd64.tar.bz2 && rm *.bz2 sqlcmd_debug | |
ENTRYPOINT ["sqlcmd"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FINAL IMAGE IS 356Mb
can get a new sha256 value with
VERSION=v1.8.0 curl -L -O "https://github.com/microsoft/go-sqlcmd/releases/download/$VERSION/sqlcmd-linux-amd64.tar.bz2" sha256sum sqlcmd-linux-amd64.tar.bz2