有没有人有在Docker容器中运行HMA的经验?
当我运行此命令时
namespace SQLiteTEST
{
public partial class Form1 : Form
{
private SQLiteConnection connection;
private String SQLSelect = "SELECT * FROM User";
public Form1()
{
InitializeComponent();
connection = new SQLiteConnection("Data Source=BddTest.s3db;Version=3;");
}
private void search()
{
dataGrid1.RowEnter -= dataGrid_RowEnter;
if (connection.State != ConnectionState.Open)
connection.Open();
SQLiteCommand command = connection.CreateCommand();
command.CommandText = SQLSelect;
DataTable dt = new DataTable();
SQLiteDataAdapter da = new SQLiteDataAdapter(command);
da.Fill(dt);
dataGrid1.DataSource = dt;
connection.Close();
dataGrid1.RowEnter += dataGrid_RowEnter;
}
private void dataGrid_RowEnter(object sender, DataGridViewCellEventArgs e)
{
int ID = int.Parse(dataGrid1.Rows[e.RowIndex].Cells[0].Value.ToString());
String Data1 = (String)dataGrid1.Rows[e.RowIndex].Cells[1].Value;
txtId.Text = ID.ToString();
txtName.Text = Data1;
}
private void Form1_Load(object sender, EventArgs e)
{
search();
}
private void dataGrid_DataError(object sender, DataGridViewDataErrorEventArgs e)
{
MessageBox.Show("erreur");
}
private void button1_Click(object sender, EventArgs e)
{
var form_programme = new Form2();
form_programme.Show();
this.Hide();
}
private void dataGrid1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void txtName_TextChanged(object sender, EventArgs e)
{
}
private void txtId_TextChanged(object sender, EventArgs e)
{
}
private void dataGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
}
我看到了
openvpn --config /etc/openvpn/UK.London_LOC1S1.UDP.ovpn
但我无法加载任何内容。
我已经在我的Vagrant机器上运行HMA OpenVPN一段时间了,配置几乎相同。 Docker可能有什么特别错过的吗?
我用Sat Jan 14 16:38:44 2017 VERIFY OK: depth=1, /C=UK/ST=London/L=London/O=Privax_Ltd/OU=HMA_Pro_VPN/CN=hidemyass.com/emailAddress=info@privax.com
Sat Jan 14 16:38:44 2017 VERIFY OK: nsCertType=SERVER
Sat Jan 14 16:38:44 2017 VERIFY OK: depth=0, /C=UK/ST=London/L=London/O=Privax_Ltd/OU=HMA_Pro_VPN/CN=server/emailAddress=info@privax.com
...
Sat Jan 14 16:38:48 2017 Initialization Sequence Completed
参数运行我的机器。
privileged
答案 0 :(得分:0)
如果不将此添加到--net=host
命令,还需要docker run
,则容器不会与主机的网络设备通信,因此无法正常工作。
我有一个类似的OpenVPN容器,我用
启动它 docker run -d --net=host --name myvpn --privileged -p 1194:1194/udp my_alpine_vpn