purpleteam icon indicating copy to clipboard operation
purpleteam copied to clipboard

Re-work Dockerfiles

Open binarymist opened this issue 3 years ago • 8 comments

The idea is to reduce build times and image sizes.

Resources/Links

  • https://github.com/docker-library/golang/blob/1a422afd7db928a821e97906ed27ed606e2f072a/1.3/Dockerfile
  • https://github.com/pantheon-systems/alpine-node/blob/master/Dockerfile
  • https://curl.se/docs/manpage.html#-L
  • https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8
  • https://github.com/mhart/alpine-node/blob/master/extract.dockerfile
  • https://www.google.com/search?q=clone+git+repository+into+alpine+dockerfile&oq=clone+git+repository+into+alpine+dockerfile&aqs=chrome..69i57.15958j0j7&sourceid=chrome&ie=UTF-8
  • https://janakerman.co.uk/docker-git-clone/
  • https://blog.cloud66.com/how-to-get-code-into-a-docker-container/
  • https://docs.docker.com/develop/develop-images/multistage-build/
  • https://docs.docker.com/engine/reference/builder/#environment-replacement

binarymist avatar Sep 01 '21 07:09 binarymist

Hello @binarymist , I am on it. Could you please assign it to me and guide me about the project as well ?

imlakshay08 avatar Mar 22 '22 12:03 imlakshay08

Where abouts do you think you need guidance? The changes will be localised to the Dockerfiles.

binarymist avatar Mar 23 '22 00:03 binarymist

Hey @binarymist I think i can help with this issue. Can you assign this issue to me as well?

rahulsurwade08 avatar Mar 23 '22 10:03 rahulsurwade08

Hi @binarymist, I want to help work on reducing the size and build times for these files. Seems like a great way to start contributing. Could you assign this to me?

shaneg07 avatar Apr 14 '22 09:04 shaneg07

How did you get on with the Dockerfiles @imlakshay08 @RahulSurwade08 @shaneg07 ?

binarymist avatar Apr 16 '22 06:04 binarymist

Hi, I started working on the Dockerfiles some days ago, but I haven't submitted a PR for review yet, but I would like to help with this.

acald-creator avatar Apr 17 '22 01:04 acald-creator

I have submitted two PRs for this issue

https://github.com/purpleteam-labs/purpleteam-orchestrator/pull/34 https://github.com/purpleteam-labs/purpleteam-tls-scanner/pull/14

The only one left is the app-scanner which I have in place but I have not submitted the PR yet.

acald-creator avatar Apr 19 '22 18:04 acald-creator

@binarymist, I'm building the docker image, and I keep getting the following error, maybe you could tell me if I missed something, I went through the documentation but i haven't found something to help me maybe i missed something 🤔, idk can you help me? executor failed running [/bin/sh -c apk add --no-cache shadow && if [ -z "getent group $LOCAL_GROUP_ID" ]; then addgroup -S -g $LOCAL_GROUP_ID $GROUP; else groupmod -n $GROUP getent group $LOCAL_GROUP_ID | cut -d: -f1; fi && if [ -z "getent passwd $LOCAL_USER_ID" ]; then adduser -S -u $LOCAL_USER_ID -G $GROUP -s /bin/sh $USER; else usermod -l $USER -g $LOCAL_GROUP_ID -d /home/$USER -m getent passwd $LOCAL_USER_ID | cut -d: -f1; fi]: exit code: 2

Freedisch avatar Dec 08 '22 19:12 Freedisch