Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Dockerfile From ClamAV Base Image with Server #187

Open
quidmonkey opened this issue Oct 24, 2022 · 1 comment
Open

Custom Dockerfile From ClamAV Base Image with Server #187

quidmonkey opened this issue Oct 24, 2022 · 1 comment

Comments

@quidmonkey
Copy link

quidmonkey commented Oct 24, 2022

I'm attempting to create a Dockerfile from the base ClamAV image so that I can run a simple Nodejs server on the same image (and talk directly to clamdscan). For example

FROM clamav/clamav:latest

RUN apk add --update nodejs npm
RUN node --version
RUN npm --version

WORKDIR /code
COPY ./ ./

CMD ["yarn","start"]

After I build the image (naming it clamav-test), I run it locally with:
docker run -it --rm --env 'CLAMAV_NO_FRESHCLAMD=true' -p 3000:3000 clamav-test:latest
I expose 3000 as my Nodejs server is running on port 3000.

When the container runs, it starts up the clamd service, but will not run my yarn start cmd.

Is there a way to add an cli executable to the clamav image for initialization?

@mko-x
Copy link
Owner

mko-x commented Nov 8, 2022

Hey @quidmonkey !

Thank you for your question.

Some questions of me:

  • How does the build log look like?
  • Did you try an interactive start?

You should not use port 3000, try another port instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants