Skip to content

Commit 73ffc3a

Browse files
committed
Add Docker image
1 parent 1a43594 commit 73ffc3a

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

Dockerfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
FROM kalilinux/kali-last-release:latest
2+
3+
4+
# https://nim-lang.org/install_unix.html
5+
ENV NIM_VERSION=1.6.2
6+
ENV NIM_HASH=9e0c616fe504402e29e43d44708a49416dcbfa295cee1883ce6e5bfb25c364f1
7+
# https://github.com/jart/cosmopolitan/releases
8+
ENV COSMO_VERSION=1.0
9+
ENV COSMO_HASH=d6a11ec4cf85d79d172aacb84e2894c8d09e115ab1acec36e322708559a711cb
10+
11+
RUN apt-get update && \
12+
apt-get -y upgrade && \
13+
apt-get -y install \
14+
gcc \
15+
golang-1.17 \
16+
metasploit-framework \
17+
python3-pip \
18+
unzip \
19+
wget \
20+
xz-utils \
21+
&& \
22+
apt-get clean && \
23+
rm -rf /var/lib/apt/lists/*
24+
25+
RUN cd /opt/ && \
26+
wget "https://nim-lang.org/download/nim-${NIM_VERSION}-linux_x64.tar.xz" && \
27+
[ X"${NIM_HASH}" = X$(sha256sum nim* | awk '{print $1;}') ] && \
28+
xz -cd ./nim* | tar -f- -x && \
29+
rm -rf *xz
30+
31+
RUN mkdir /opt/cosmo/ && \
32+
cd /opt/cosmo/ && \
33+
wget "https://github.com/jart/cosmopolitan/releases/download/${COSMO_VERSION}/cosmopolitan-amalgamation-${COSMO_VERSION}.zip" && \
34+
[ X"${COSMO_HASH}" = X$(sha256sum cosmo* | awk '{print $1;}') ] && \
35+
unzip *zip && \
36+
rm -f *zip
37+
38+
39+
ADD ./requirements.txt /tmp/requirements.txt
40+
RUN pip3 install --no-cache-dir -r /tmp/requirements.txt && rm -f /tmp/requirements.txt
41+
ADD ./pop/ /opt/pop
42+
43+
RUN useradd -s/bin/false -r pop
44+
USER pop
45+
WORKDIR /opt/
46+
CMD PATH="/opt/nim-${NIM_VERSION}/bin:/usr/lib/go-1.17/bin:\${PATH}" waitress-serve --call pop:create_app
47+
#CMD waitress-serve --call pop:create_app

tools/heroku-flask-set-config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ set -eu
44
APP_NAME="${1}"
55

66
heroku config:set -a "${APP_NAME}" "POP_URL=https://${APP_NAME}.herokuapp.com/"
7+
heroku config:set -a "${APP_NAME}" 'POP_DESTDIR=/tmp'

0 commit comments

Comments
 (0)