Skip to content

Conversation

Hydragyrum
Copy link
Contributor

Here's a simple multi-stage docker file with the bare minimum.

It probably needs a bit of tweaking and testing, though it seems to find things locally :)

@Hydragyrum Hydragyrum mentioned this pull request Aug 4, 2020
8 tasks
@CMNatic
Copy link
Contributor

CMNatic commented Aug 5, 2020

LGTMY 👍🏻 cc @brandonskerritt

@bee-san
Copy link
Owner

bee-san commented Aug 5, 2020

Should we replace the default Docker image of RustScan with this one? :)

@Hydragyrum
Copy link
Contributor Author

Might want to run as a normal user rather than root to avoid surprises

@CMNatic
Copy link
Contributor

CMNatic commented Aug 5, 2020

Dokcerbuild file fails locally, not quite sure how the rust base imagine works which is why I built used a os slim to build up. Future goals are to do the exact same with Alpine which in turn will reduce the image size (it's 298mb compress, 700~ uncompressed at the time being)

The .deb wsa quite larger and required more interaction with in the first place

Pathing / env issues? @Hydragyrum
image

@Hydragyrum
Copy link
Contributor Author

You'll probably want to configure Travis to push an official image to dockerhub

@CMNatic
Copy link
Contributor

CMNatic commented Aug 5, 2020

The current debian file can be greatly reduced I agree, this was just a "bandaid" until I got the chance (and wanted to use RustScan ASAP without the loopholes of install rust & cargo etc)

@Hydragyrum
Copy link
Contributor Author

Ah you have to checkout the repo to build it, @CMNatic

@Hydragyrum
Copy link
Contributor Author

Added a non-privileged user to run the scan as per docker best-practices

@CMNatic
Copy link
Contributor

CMNatic commented Aug 11, 2020

Sorry for only just getting to this. IRL things and whatnot....

Build works a-okay for me 👍🏻 nice touch on the non-root user @Hydragyrum

image

Going to confirm with the other reviewers that they're happy for an intermediary Dockerfile which uses rust:alpine as the base to be shipped with the repo.

cc @brandonskerritt Does the above sound good to you? With this, we can update the readme and allow users to either build from the above Dockerfile which uses rust:alpine as a base or pull from the published image we currently have DockerHub that compiles from source

The long term idea is to publish an alpine-based docker image that compiles all from source

@Hydragyrum
Copy link
Contributor Author

Hydragyrum commented Aug 11, 2020

@CMNatic the final image uses just alpine, the rust image is used for only for building.

Note the 2 FROM commands in the dockerfile.

@bee-san
Copy link
Owner

bee-san commented Aug 11, 2020

Sorry for only just getting to this. IRL things and whatnot....

Build works a-okay for me 👍🏻 nice touch on the non-root user @Hydragyrum

image

Going to confirm with the other reviewers that they're happy for an intermediary Dockerfile which uses rust:alpine as the base to be shipped with the repo.

cc @brandonskerritt Does the above sound good to you? With this, we can update the readme and allow users to either build from the above Dockerfile which uses rust:alpine as a base or pull from the published image we currently have DockerHub that compiles from source

The long term idea is to publish an alpine-based docker image that compiles all from source

As long as you're happy thats cool, do you want to add to the README in this PR and then submit an approval & merge? :)

Copy link
Contributor

@CMNatic CMNatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the submission @Hydragyrum! Sorry it took a lil' while. We just wanted to get the scope of how we're going to CI this in the future (:

Copy link
Contributor

@CMNatic CMNatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved after CI checks!

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

Successfully merging this pull request may close these issues.

3 participants