我必须在 docker 文件上执行两个命令,但是这两个命令都附加到终端并阻止下一个执行。
码头档案:
FROM sinet/nginx-node:latest
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN git clone https://name:pass@bitbucket.org/joaocromg/front-web-alferes.git
WORKDIR /usr/src/app/front-web-alferes
RUN npm install
RUN npm install bower -g
RUN npm install gulp -g
RUN bower install --allow-root
COPY default.conf /etc/nginx/conf.d/
RUN nginx -g 'daemon off;' & # command 1 blocking
CMD ["gulp watch-dev"] # command 2 not executed
Run Code Online (Sandbox Code Playgroud)
有人知道我该如何解决这个问题?
我正在尝试按照本教程在 VS Code 上配置 XDebug:
但在这一点上:
VS Code 不显示 PHP 选项。
我尝试重新安装 VS Code 和 XDebug。我尝试重新安装 php 服务器并更改 PHP 服务器,但没有任何效果。
我创建了其他教程,但向我展示了同样的问题:当我单击 gear 时,只显示不带 php 选项的 launch.json
我有一个带有以下代码的应用程序 .NET core 2.1:
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseStaticFiles();
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), "Assets")),
RequestPath = "/Assets"
});
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseMvc();
}
Run Code Online (Sandbox Code Playgroud)
和我的结构文件夹:
但这些网址都没有打开图像:
“my-website.com/images/snes/alien.jpg”
“my-website.com/wwwroot/images/snes/alien.jpg”
“my-website.com/Assets/Snes/alien.jpg”
有人知道出了什么问题吗?
编辑:这是 CurrentDirectoy() 方法获取的文件夹(显然是正确的):
Edit2:使用此代码在 localhost 上工作,但在我在 azure 上发布时却没有:
app.UseFileServer(
new FileServerOptions()
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"))
});
Run Code Online (Sandbox Code Playgroud) 我有这个代码Linq c#
from r in Employer.Restrictions
select new RestrictionDto(r);
Run Code Online (Sandbox Code Playgroud)
雇主限制在注册,但RestrictionDto的构造函数从未被调用,只返回null.我在restrictionDto中放了一个breakPoint,代码永远不会停止.
我以前从未见过这个问题.我在代码中有很多这样的代码并且工作正常.
有人可以帮忙吗?