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

Resolves issue #308 #386

Closed

Conversation

peter279k
Copy link

Closes #308.

@digininja
Copy link
Owner

Talk to @seizadi, he is trying to add Kubernetes support which needs Docker.

I suggested using this https://github.com/opsxcq/docker-vulnerable-dvwa but found out it isn't supported any more so we would probably be better using a local version.

I don't understand either technology and don't have the time to learn them so anything that is merged in will have to be supported by you or @seizadi.

@seizadi
Copy link

seizadi commented Sep 21, 2020

One thing that was nice in this commit was the use of Git Hub Actions to build the container and push it. If you are ok with this I can make this change to my PR or peter can submit an update when my PR is merged. This way every time there is an update to the project you have a new container.

@digininja
Copy link
Owner

digininja commented Sep 21, 2020 via email

@peter279k
Copy link
Author

peter279k commented Sep 21, 2020

I think using the K8s and Docker container are different approaches/purposes to build this vulnerable web application repository.

And I think it's good to have these above approaches on this repository :).

@peter279k
Copy link
Author

One thing that was nice in this commit was the use of Git Hub Actions to build the container and push it. If you are ok with this I can make this change to my PR or peter can submit an update when my PR is merged. This way every time there is an update to the project you have a new container.

@seizadi, I think you can update your PR.

After your PR has been merged and updated, I will update my PR :). Thanks.

@digininja
Copy link
Owner

digininja commented Sep 21, 2020 via email

@peter279k
Copy link
Author

peter279k commented Sep 21, 2020

Do we need both PRs?

On Mon, 21 Sep 2020 at 09:24, Chun-Sheng, Li @.***> wrote: One thing that was nice in this commit was the use of Git Hub Actions to build the container and push it. If you are ok with this I can make this change to my PR or peter can submit an update when my PR is merged. This way every time there is an update to the project you have a new container. @seizadi https://github.com/seizadi, I think you can update your PR. After your PR has been merged and updated, I will update my PR :). Thanks. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#386 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA4SWPZ5YFD4C6SVWSDTS3SG4ET7ANCNFSM4RUCN2WQ .

I think we need both because their purposes are different.

The K8s support is for the Cyber-Defense system and it needs a robust machine and the Docker container setup is for developers and hackers on their local development environment.

@digininja
Copy link
Owner

digininja commented Sep 21, 2020 via email

@peter279k
Copy link
Author

peter279k commented Sep 21, 2020

@digininja, @seizadi. I figure out another approach about resolving the issue.

I create a repository named peter279k/docker-dvwa and build the Docker image with the latest commit on this repository.

Then publishing the Docker image to the Dockernub page. And I also replace the Dockerhub page link on this section.

I think it's fine to let the PR #384 be merged because I think it's fine to have the K8s support officially for this repository.

And it's more important/powerful than building the Docker container setup.

What do you think about that?

@digininja
Copy link
Owner

digininja commented Sep 21, 2020 via email

@peter279k
Copy link
Author

peter279k commented Sep 21, 2020

@digininja, I plan to let the tag releasing be same as this repository.

But it doesn't release new tag version for the long time.

I think it's fine to up-to-date image via git clone command once this repository has the latest commit on the master branch.

And the Docker image tag can be the short commit hash that is same as commit hash om this repository.

@digininja
Copy link
Owner

digininja commented Sep 21, 2020 via email

@peter279k
Copy link
Author

We can consider building the latest commit on master and don't care about tag history and it will be up-to-date.

@digininja
Copy link
Owner

digininja commented Sep 21, 2020 via email

@seizadi
Copy link

seizadi commented Sep 21, 2020

If we setup Github Action, we will need to tag the system and release zip, container tag and if necessary update helm chart. So people that want something that works can use the tags. The latest is not guaranteed to work, as enough time goes by Dockerfile will need changes due to breaking changes in master.

@digininja
Copy link
Owner

digininja commented Sep 21, 2020 via email

@peter279k
Copy link
Author

I've got an action setup that checks for broken links every time I commit a change, can't you do the same as that does?

I think it's possible and I think I can monitor the commits changing on this repository.

Once the upcoming pull requests and commits are merged on the master branch, I will update the commit on my docker-dvwa repository.

@seizadi
Copy link

seizadi commented Sep 22, 2020

Why would be setup a separate Docker repo, I thought Robin agreed that once we get the Dockerfile in the PR merged, we would setup a GitHub Action to build and push the latest container. Also we would tag the current master and create a Docker image/tag with that version that we know works. Going forward you have a tag version that we know works and the latest container image. If someone is willing to test and tag a version you can get a new tagged version, from what I have seen this is at best an annual event.

@digininja
Copy link
Owner

digininja commented Sep 22, 2020 via email

@cytopia
Copy link

cytopia commented Mar 29, 2021

Once the upcoming pull requests and commits are merged on the master branch, I will update the commit on my docker-dvwa repository.

I have done something comparable, as there was no current Image available on Dockerhub and then stumbled across this thread here.

My approach works independently of tagging or not tagging and doesn't require any human interaction for updates. The image just rebuilds itself automatically every night against the latest master branch of DVWA and then pushes itself to Dockerhub. This is regardless of new code in DVWA or not. So at any given time, the image is at max 24 hours old/behind.

You can find the repo and its automation pipelines here: https://github.com/cytopia/docker-dvwa and might get some additional inspiration from another angle of doing it.

Let me know if you need any support or explanation of the pipelines.

@digininja
Copy link
Owner

That sounds like a good way to do it

@digininja
Copy link
Owner

@its0x08 what are you approving? There are a bunch of different options given here that all seem to be suggesting better ways to do it than this PR.

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.

Docker file or docker-compose supports
5 participants