How to build a docker image using a dockerfile and windows cmd - dockerfile

I am a "noob" in computer related stuff, but I need to get OWASP OWTF to work because I have to demonstrate it for some other students(short demo, basics).
Therefore I installed docker desktop on my windows computer and downloaded the OWTF repo( the whole, and the specified docker repo), but when I type "docker build -t (path to dockerfile)" for either of the dockerfiles in the windows cmd, it says "system cannot find the file specified".
Dunno where I went worng or what my mistakes are, if anybody can help me to get it working that would be greatly appreciated.
tried some commands, files were not found

Related

Tensorflow Serving using Docker

I have created a Neural Network Regression Model and I wish to deploy it using AWS.
I am using tensorflow serving, and have gone so far as to save the model.
Now I am trying to use Docker to deploy it in the container using Docker on Windows 10 home
As an example, I tried to use multiple tutorials but when it comes to this command, no matter what I do, it just doesn't work for me:
docker run -t --rm -p 8501:8501 -v "$TESTDATA/saved_model_half_plus_two_cpu:/models/half_plus_two" -e MODEL_NAME=half_plus_two tensorflow/serving
Every time I change something, I get a different error. I am totally at loss. Please direct me to some tutorials for this that are simple but complete for novices like me. I have already read the TensorFlow documentation but the errors persist.
Any help would REALLY oblige me greatly since I have been stuck for about a month now.
The easiest tutorial I found was https://www.tensorflow.org/tfx/serving/docker#serving_example
Also
Docker toolkit
has trouble with the mounts as you have to manually specify the path, so if you can afford it, upgrade to Windows Pro which will simplify dockerization. That way you will get Docker Desktop which is much simpler.

Local Docker run fails (An assembly specified in the manifest was not found)

I am trying to test my local Docker build before I deploy to AWS. My app has dependencies to AWSSDK.Core via NuGet and I am using the following Docker file:
FROM microsoft/dotnet:2.2.0-aspnetcore-runtime AS runtime
WORKDIR /My.App
COPY bin/Release/netcoreapp2.2 .
ENV ASPNETCORE_URLS http://+:5000
EXPOSE 5000
ENTRYPOINT ["dotnet", "My.App.dll"]
To build my file
docker build -t myapp .
However, when I try to run it with
docker run -it --rm --name my_app myapp
I get the error
Error:
An assembly specified in the application dependencies manifest (My.App.deps.json) was not found:
package: 'AWSSDK.Core', version: '3.3.106.17'
path: 'lib/netstandard2.0/AWSSDK.Core.dll'
As far as I can tell, I should be adding a RUN command to install the AWSSDK in my Docker image but I cannot find it. So, my question would be: Am I doing something wrong? If not, is there some kind of reference as to the locations of packages to use in Docker?
After digging around some, I found a few possible answers. First I found this blog post which exemplifies how to use docker with .NET with a very simple project. The solution to my problem was to use the dotnet package command, which gathers all the dependencies and puts them in a single directory.
However, after digging some more, I found Microsoft's Container Tools in Visual Studio which, by pressing the right mouse button on the project, offers to add Docker Support which is more elaborate than the first solution.

Dockerize a Visual Studio C++ project on Windows home

I am new to Docker, using windows 10 home edition, and want to create a docker image for my C++ project developed with visual studio. As far as I understand, the image I need to create is going to be a windows image, and therefore I need to install “Docker for windows” and enable the Hyper-V feature. This is not possible with my windows home edition, as Hyper-V is available for windows 10 pro only. The other alternative, using “Docker toolbox” and a virtualbox linux VM, does not support creating or pulling windows containers. Did I miss something? Is there a workaround?
You could use the Windows Linux Subsystem: https://medium.com/#sebagomez/installing-the-docker-client-on-ubuntus-windows-subsystem-for-linux-612b392a44c4
EDIT: On second read of your question you probably want to have a windows-container for visual studio. This solutions makes Linux-containers possible, but doesn't help with windows images...
As you know, you are unable to install Docker for Windows Home edition, as it requires Hyper V virtualization.
So these are your options:
You will need to install Docker Toolbox which uses VirtualBox instead.
Docs and setup info available here:
https://docs.docker.com/toolbox/toolbox_install_windows/
Release downloads available here:
https://github.com/docker/toolbox/releases
Toolbox will install everything you need including VirtualBox.
You may also need to enable virtualization in your computer's BIOS settings. This will be different for each manufacturer, please refer to their documentation on which keys to use to access these settings on reboot.
After Toolbox is finished installing, open the Docker Quickstart Terminal. This will complete the setup and provision your VirtualBox machine.
Check your install:
Launch the Docker QuickStart terminal and type the command:
docker run hello-world
This should pull down the test container and print hello-world to your screen.

Unable to install Docker for Windows for the Divio App

When trying to set up the Divio app, I get this warning screen.
DivioSetupWarningScreen
However, even though the picture claims I do, I don't have Docker Toolbox installed. When I try to install Docker for Windows on anyways by pressing the "Continue" button as seen in the picture above, I get this.
DockerNotInstalled
In the second picture, I tried clicking "Contact Support," but that led me to a blank webpage. Also, if I try to install Docker Windows without the Divio App, but it would not let me because I do not have the enterprise Windows OS, just the home. I also tried downloading Boot2Docker Start, but that didn't really help.
I'm at a loss as to what to try next. Any help would be appreciated.Thanks!
As you have Windows Home edition, one of the solutions would be to install Docker Toolbox/VirtualBox manually and use Divio CLI in PowerShell. Because current version of Divio App does not recognize Windows edition type. It should be presented in the next coming release.

Installing open source web-based software?

new to working with Web Servers and despite my tedious Googling, I think I am missing some of the most general (obvious?) questions regarding how to install an open source web-based program.
I have a dedicated server running CentOS 6, 32GB of RAM, etc........ I used a SSH Client to install the prerequisites of PandoraFMS. Everything installed finE.
Now what, just upload all the open-source files onto the web server?? That's the part I am not understanding about the general process of installing an open source program using build files, do I just UPLOAD it all to my server, or am I missing something???
You use Yum from the command line. Here is a link to the documentation http://www.centos.org/docs/5/html/yum/sn-managing-packages.html. If you really want a linux box that is easy to use I recommend Ubuntu. Good Luck