Docker Client - standalone (portable) version on Windows - c#

Does Docker support the standalone (version, xcopy installer) version?
I would like to use docker only to create Windows container images (not run containers) in .NET C# code, and I cannot assume that the machine on which code would be run has docker preinstalled, so having portable version bundled with the code would help.
OS: Windows Server
Edit 2: Docker Client is needed only

Try this link:
https://download.docker.com/win/static/stable/x86_64/
(((((( for 30 chars

Windows requires an emulator to run Linux in order to create a Linux container.
To make it portable, use "Portable-VirtualBox" (administrator privileges required) or "Qemu" (slowly) to run the Linux environment.
I don't think the Windows container creation environment can be made portable.

Related

How do I export a C# project for Mac and Linux on my Windows 10?

I have created a console app using C# and .Net core version 5 on Visual Studio IDE. I understood how you can publish this app for the same OS. So now I can share my C# project as a .exe with all my friends. But all my friends don't have a windows. Since this is a console app, it said that I could share it with anyone having Linux/Mac. Also, I only have windows.
So the main question: How do I export my .cs project in such a way that I get files for Mac and Linux with just a windows machine? Also is it possible to do this without using non-Microsoft services since it poses security risks?

Get Windows common path running Ubuntu subsystem

I am developing an application .NET Core (dotnet) in C# that must run on Windows 10, Linux AND in the Linux subsystem that can be installed in Windows 10.
The problem is that the application must stored files in a common location to let other application use they. That is, others applications (that are clients) must resolved the same path as this application does. So, the same code must be added in all of the clients to know where the files are storage.
I searched a lot and I found this solution:
Console.WriteLine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData));
This returns me on Windows:
C:\ProgramData
And on Linux:
/usr/share
I like this solution but the problem here is that when the program is running in a Linux subsystem, I want to use a path that can be acceded from applications running on Windows natively.
I know that Windows is mounted in /mnt/c/ in the Linux subsystem but y dont want to have hardcoded paths.
Is there any way to have programatically (running on Linux subsystem) a path in the Windows host? That is, if the program run on Linux natively the path that returns is /usr/share BUT if it is a subsystem, the path that returns is /mnt/c/ProgramData (or something like that).
Thanks!

PushSharp stops at StopAllServices

I use PushSharp-2.2.1.0 and I can't go up in version because of the program using it is built in .NET 4.0. For now I only use PushSharp.Apple.
On my local machine (Windows 10) I can run my stuff with no problems. Here I run the program as a Console Application.
When I run the stuff on another server (Windows Server 2008 or Windows Server 2003) I get problems. The only thing I can see from my log is that it stopps at StopAllServices. Here I run the program as an installed Windows Service.
On both machines I use the same files (incl. .p12 file(s)).
I have checked the NewtonSoft dll and it's the same as the one PushSharp uses and the same I use on the local machine. The use that the service run as has all permissions to the .p12 files.
Does anyone know what I can do to get it up and running?
By re-building the PushSharp.Apple project with updated (from 6 something to 8 something) version of Newtonsoft.dll to match other projects in the solution and with removing the CheckProductionCertificateMatching in ApplePushChannelSettings (also in PushSharp.Apple) I got this working for now with PushSharp.2.2.1.0.

run c sharp program without installing in client machine

I want to run an application in client machine without installing it in the client machine. the application file should be in my usb pen drive and when I go to customer pen is plug in client machine and run the application. The system is developed by c#. Please send any ideas.
Build it in .Net framework 2. Then you can run it in almost all the windows machine except windows 8. .Net framework 2 is disabled by default in windows 8. You can enable it and run your app. Framework 2 will be available when installing windows and can run by double clicking the exe
If you are just interested in running the C# program, there are various online C# compiler available. For eg:
http://www.compileonline.com/compile_csharp_online.php
http://ideone.com/
If it is an application in .exe, you should be able to run it in windows without installing anything, as Windows already contains a version of .Net by default.
If you just have the dlls, scripts etc, you are in deep trouble.
It sounds as if you're after a linker/merger/virtualizer. I don't have any experience with these tools but they are cited quite often:
Xenocode
Thinstall
ILmerge
Salamander
SkaterPro
Spoon Studio

Using Etsy's StatsD in a Windows Environment

What will I need to use Etsy's Statsd in a Windows Environment? My intentions are to create a .net client to use Statsd.
I have statsd+graphite running in my Windows environment using the C# client NStatsD.
Here are my notes for getting the Linux VM setup:
Note: I know enough Linux to be dangerous but am otherwise a noob and could be doing something unwittingly horrible.
Install Ubuntu Server 12.04. I used VirtualBox for dev and then later EC2 for prod.
Download graphite-fabric to your home folder. This is a script that will download, compile and install graphite and statsd. It expects a clean box and uses nginx for the web server.
sudo apt-get install git
git clone git://github.com/gingerlime/graphite-fabric.git
cd graphite-fabric/
Install prereq's for fabric
sudo apt-get install python-setuptools
The next steps are a download, compile and install which can take some time. It is worthwhile setting a keep alive on any putty ssh session before continuing.
Now install as per gingerlime's instructions in the README.md - including the requirements section.
Install statsd as per gingerlime's instructions.
Reboot
Execute netstat -nulp and observe 8125 is in use to confirm statsd is listening.
Check carbon is running tail /opt/graphite/storage/log/carbon-cache/carbon-cache-a/listener.log. If it isn't, try sudo /etc/init.d/carbon start
Now you have your server running, try throwing some counters at it with the NStatsD client.
Timezone fix:
This will fix graphite to graph times in your local zone
cd /opt/graphite/webapp/graphite
sudo cp local_settings.py.example local_settings.py
sudo chown www-data:www-data local_settings.py (check with ls -l that permissions look right)
sudo pico local_settings.py Set TIME_ZONE to something like Australia/Sydney. Discover what timezones you can use in /usr/share/zoneinfo/
Save and restart the box (not sure how to make it pick up the change without restart)
EC2 Notes
root is disabled on EC2. Fabric prompts for a root password which you don't have. Use the -i keyfile argument with fab to give it your ssh keyfile instead.
VirtualBox Notes
VBoxVMService was handy to automatically run the VM as a service in my Windows dev environment.
TL;DR:
statsd.net is a scalable statsd clone with lots of cool extras, and designed for windows-centric environments. First production release is on the 29th of May, 2013
statsd-csharp-client is a lightweight statsd and statsd.net client, available for .net 3.5, 4.0 and 4.5 via nuget.
Full Disclosure: I'm the author of these two projects and I wrote them because I couldn't take etsy's statsd service to production - my organisation isn't ready to deploy and support nodejs-based services.
I had the same problem in my organisation - we're a windows-centric environment that wants to collect stats from all over the world into a single graphite repository. I had initially thought of using etsy's statsd but my company is not yet ready to roll with nodejs services in production. Along the way I found that having my own aggregation service meant I can do lots of interesting things like add memcached support for scalability, add new aggregators and so on.
The service is usable in console mode right now, and will be ready for production use from the 29th of May 2013 onwards.
Your best bet is to have a Linux server with statsd and Graphite installed. You would then just need to write some C# code to make the UDP call to get the metric into the system.
[UPDATE (6/23/2014): I came across a statsd/Graphite clone called statsd.net that looks promising but largely lacking on the Graphite side of the equation. I still think the best bet is to use the actual statsd/Graphite projects since any clone is necessary playing catch-up.]
We've re-built Graphite/StatsD in pure .NET. It is currently being used in production environment, processing around 600M datapoints daily.
Statsify:
There is quite a few open-source StatsD client implementations available in different Language including C#.NET. Etsy provide one on their github examples, also check out AppFirst version of statsd_clients.
Current statsd and nodejs versions allow you to run statsd on Windows without amendments. statsd package.json file already contains scripts to install and uninstall it as Windows service.
The installation procedure would be:
Install nodejs for Windows
Create a directory like C:\StatsD
Open a console window and do cd \StatsD
Then do npm install https://github.com/etsy/statsd.git
In node_modules\statsd directory create your own config.json
In the console window do cd node_modules\statsd and npm run-script install-windows-service
However, Graphite only runs on Linux.
You need a statsd server to connect to.
You also need a client library to connect to it, e.g. this one and the nuget package of it.

Categories

Resources