Skip to content

Instantly share code, notes, and snippets.

@sebsto
Last active October 23, 2020 20:45
Show Gist options
  • Save sebsto/ab97f5ca2ba432d66d248154455377cb to your computer and use it in GitHub Desktop.
Save sebsto/ab97f5ca2ba432d66d248154455377cb to your computer and use it in GitHub Desktop.
Lightsail Container Docker Image
FROM amazon/aws-cli
# RUN yum install -y curl groff git
RUN amazon-linux-extras install docker
# download and install lightsailctl as per
# https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-install-software
RUN curl "https://lightsailctl.s3-us-west-2.amazonaws.com/latest/linux-amd64/lightsailctl" -o "/usr/local/bin/lightsailctl"
RUN chmod u+x /usr/local/bin/lightsailctl
RUN export PATH=/user/local/bin:$PATH
WORKDIR /
# build with
# docker build -t lightsail-cli . -f Dockerfile.public
# launch with
# docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v ~/.aws:/root/.aws lightsail-cli lightsail get-regions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment