feat: optimize Docker image (#2398)

This commit is contained in:
Peter Mosmans
2022-06-09 15:01:49 +02:00
committed by GitHub
parent b87463a60d
commit f68e420318
2 changed files with 10 additions and 4 deletions

9
.dockerignore Normal file
View File

@@ -0,0 +1,9 @@
# Don't copy over git files
.git
.github
.gitignore
doc
docs
scripts
test
update-beef

View File

@@ -41,14 +41,11 @@ LABEL maintainer="Beef Project: github.com/beefproject/beef"
# Create service account to run BeEF
RUN adduser -h /beef -g beef -D beef
COPY . /beef
COPY --chown=1000:1000 . /beef
# Use gemset created by the builder above
COPY --from=builder /usr/local/bundle /usr/local/bundle
# Grant beef service account owner and groups rights over our BeEF working directory.
RUN chown -R beef:beef /beef
# Install BeEF's runtime dependencies
RUN apk add --no-cache curl git build-base openssl readline-dev zlib zlib-dev libressl-dev yaml-dev sqlite-dev sqlite libxml2-dev libxslt-dev autoconf libc6-compat ncurses automake libtool bison nodejs