Skip to content

Instantly share code, notes, and snippets.

@PopeFelix
Created August 26, 2021 15:43
Show Gist options
  • Select an option

  • Save PopeFelix/2bd3fe93d0917035208aa39de07c8a9d to your computer and use it in GitHub Desktop.

Select an option

Save PopeFelix/2bd3fe93d0917035208aa39de07c8a9d to your computer and use it in GitHub Desktop.
Docker with Locust and S3FS
# I want to run Locust (https://locust.io) inside of a Fargate container and pulling the Locustfile from S3.
# My thought was that I would use S3FS to do that, but that requires privileged mode, which Fargate doesn't
# do. So S3FS isn't going to work, but I thought putting the Dockerfile up here might prove useful at some point.
FROM paterit/locustio AS base
RUN apk update
RUN apk add --no-cache \
fuse \
curl \
libxml2
FROM base AS builder
RUN apk add --no-cache \
gcc \
g++ \
linux-headers \
make \
build-base \
automake \
autoconf \
git \
openssl-dev \
fuse-dev \
libxml2-dev \
curl-dev
RUN mkdir /s3fs-install
WORKDIR /s3fs-install
RUN git clone https://github.com/s3fs-fuse/s3fs-fuse
WORKDIR s3fs-fuse
RUN ./autogen.sh
RUN ./configure --with-openssl --prefix=/install
RUN make
RUN make install
#RUN mkdir /install
WORKDIR /install
FROM base
COPY --from=builder /install /usr/local
ENTRYPOINT ["/bin/sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment