Skip to content

Commit

Permalink
maybe I can't run malice as malice?
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Aug 5, 2016
1 parent b91c317 commit 186d4ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:

test:
override:
- docker run malice_engine
- docker run -v /var/run/docker.sock:/var/run/docker.sock malice_engine

deployment:
# master:
Expand Down
26 changes: 3 additions & 23 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,9 @@ FROM gliderlabs/alpine:3.4

MAINTAINER blacktop, https://github.com/blacktop

ENV GOSU_VERSION 1.9

RUN apk-install file tini
RUN apk-install -t build-deps go git mercurial build-base file-dev \
&& set -x \
&& echo "Grab gosu for easy step-down from root..." \
&& apk-install -t .gosu-deps \
dpkg \
gnupg \
openssl \
&& dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \
&& wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \
&& wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \
&& rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
&& gosu nobody true \
&& apk del .gosu-deps \
&& set -x \
&& echo "Building malice Go binary..." \
&& git clone https://github.com/maliceio/malice.git /go/src/github.com/maliceio/malice \
&& cd /go/src/github.com/maliceio/malice \
Expand All @@ -30,10 +13,7 @@ RUN apk-install -t build-deps go git mercurial build-base file-dev \
&& go get \
&& go build -ldflags "-X main.Version=$(cat VERSION) -X main.BuildTime=$(date -u +%Y%m%d)" -o /bin/malice \
&& echo "Copy malice config files..." \
&& addgroup malice \
&& adduser -S -G malice malice \
&& mkdir /malice /malware \
&& chown -R malice:malice /malice /malware \
&& mkdir /malice \
&& cp /go/src/github.com/maliceio/malice/data/config.toml /malice \
&& cp /go/src/github.com/maliceio/malice/data/plugins.toml /malice \
&& rm -rf /go \
Expand All @@ -48,6 +28,6 @@ EXPOSE 80 443

WORKDIR /malice/samples

ENTRYPOINT ["gosu","malice","/sbin/tini","--","malice"]
ENTRYPOINT ["/sbin/tini","--","malice"]

CMD ["--help"]

0 comments on commit 186d4ee

Please sign in to comment.