reconmap / command-line-tools

Reconmap CLI and agent command line tools
Apache License 2.0
3 stars 3 forks source link

Docker image can't execute commands #3

Open DanijelMi opened 2 years ago

DanijelMi commented 2 years ago

reconmapd is trying to call /bin/bash when invoking the interactive terminal, however the current Docker image build doesn't have bash installed.

smatz-ITGAIN commented 2 years ago

I have the same issue. My temporary solution is to clone the agent Repo and modify the Dockerfile as follows:

FROM golang:1.17-bullseye

WORKDIR /build

COPY go.mod go.sum ./
COPY cmd/ ./cmd/
COPY internal/ ./internal/

ENV CGO_ENABLED=0
RUN go build -o /build/reconmapd ./cmd/reconmapd

WORKDIR /app

RUN cp /build/reconmapd /app/reconmapd

EXPOSE 2020

CMD ["/app/reconmapd"]

As you can see I removed the multi stage build and changed the base image. This results in a much bigger image but it works for now.

Edit: You can build the modified image by running

make docker-build