所有问题
docker - 设置 ci/cd 系统时何时使用 docker:dind
我只是 gitlab 的新手,docker 的新手。我非常熟悉 CI/CD 最佳实践。我正在尝试了解/确定使用 docker:dind 将使我和我的团队受益的特定用例。
我一直在阅读这篇文章:https ://www.caktusgroup.com/blog/2020/02/25/docker-image/
在我们的环境中,我们设置了 HP 刀片(开发、登台、生产),每个都运行 docker 守护进程。
我能想到的一个用例是,如果开发人员想在他/她的桌面上本地尝试一些东西……那运行的 Docker 版本与我们的服务器上不同。他们也许可以在本地使用 docker:dind 映像,但指定与我们的服务器匹配的版本?没有把握。
有人可以帮我想出一些实际例子来说明何时/为什么有用吗?谢谢。
ubuntu - 整个主机被锁定并在 bitbake 运行时关闭所有应用程序
我最近开始看到这个问题,我运行build-image编译 Yocto 映像,它会在完成构建 60% 左右后锁定整个 Linux 机器,并且在记录它时,你会看到机器好像被重置了。
dmesg 日志如下所示:
我正在使用 Ubuntu 16.04
python - Youtube Data Api Page Token Question (python)
我尝试下载 2019 年的视频元数据。每次运行我的代码时它都超过了配额限制。在那段时间里,我有不到 100 个视频。谁能告诉我一个更好的方法来编写代码?
谢谢!
python - 在 Tkinter for SQL 中使用 GET
我正在尝试创建一个简单的程序,允许用户在 tkinter GUI 中输入 First、Middle Init 和 Last Name。当用户点击“保存”按钮时,程序会将 GUI 中的条目写入数据库。
我在 tkinter 中使用“Get”时遇到了一些麻烦。我的代码在我的数据库中插入空白行
php - PHP MYSQL 中的错误跟踪 - 是否有更多信息?
我正在尝试为网站实施用户注册。一切都很好,直到我在服务器上的错误日志中得到这个:
堆栈跟踪:
#0 /home/yclyxfu6ktu0/public_html/mydomain.com/newapp/register.php(50): PDOStatement->fetchAll()
#1 {main} 抛出 /home/yclyxfu6ktu0/public_html/mydomain.com/newapp /register.php 第 50 行
所以,我转到register.php中的第 50 行。
新的用户信息被插入到数据库中,所以我知道数据库连接有效。谁能告诉我为什么脚本在这里失败:
先感谢您!我根本无法弄清楚这句话有什么问题。
mysql - 如何在 docker 中使用正确版本的 MySQL?
我是 Docker 的初学者。也就是说,我注意到以下我认为有点奇怪的内容。
在控制台中执行了一个docker pull mysql/mysql-server:5.6.23之后,在我玩了一点 Docker 和他的入门教程之后,我启动了拉取的 MySQL v5.6.23(不要问我为什么这么旧的版本)容器,我意识到欢迎消息正在显示MySQL的错误版本:
仍在使用 docker 命令,我发现了以下内容:
包 url 指向 MySQL 的下一个颠覆,而不是我的目标:
"PACKAGE_URL=https://repo.mysql.com/yum/mysql-5.6-community/docker/x86_64/mysql-community-server-minimal-5.6.24-2.el7.x86_64.rpm"虽然图像名称包含正确的版本号"Image": "mysql/mysql-server:5.6.23"。
ruby-on-rails - 纱线运行构建 - 没有这样的文件或目录:'运行'
我正在使用 Ruby on Rails 5 并按照此处的步骤实现 CKEditor 5:https ://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/installing-plugins.html
我已经成功克隆了 git,运行了 npm install,更新了ckeditor.js文件以包含对齐模块,但现在我无法yarn run build按照说明运行:
我究竟做错了什么?如果我执行ls,看来我在正确的目录中:
这是否意味着我yarn偶然使用了错误的版本?
amazon-web-services - AWS Lambda 跟踪和限制来自用户的经过身份验证的调用
我目前有一个 S3 存储桶运行一个带有 Cognito 用户身份验证的静态网站。我从这个存储桶调用一个 Lambda 函数来验证用户的 JWT 令牌。我试图限制用户能够对该功能进行的调用次数,例如每小时 1 次。我该怎么做呢?
- 我最初的计划是在前端做一些事情,但这很容易被绕过。
- 我查看是否有适用于此的 AWS 服务,但我发现最接近的是 Cloudtrail,它并不真正适合这个
- 我目前的计划是创建 Cognito userAttributes 来跟踪用户进行了多少次调用并通过 lambda 更新它们,但这也感觉是错误的方法
c# - LINQ:尝试提取数据并连接关系不同的 3 个表(一对一、一对多)
我是@LINQ 的新手,我正在尽力而为。我知道如何以一对一的关系拉动和加入这些表,但我一直在尝试用更好的方法来实现这一点:
- 一对一
- 一对多
但是现在我不知道如何从游戏表中的特定日期时间获取玩家和分数。我正在使用:.NET Framework 4.7.2和Entity Framework 6.4.4,并使用Code First方法。
编辑:我通常在匹配的 Datetime timestamp上加入他们。
编辑#2:我的尝试:
....=> t ->是对此的一些输入function,下面是body:
编辑#3:试图把它变成List<Object>().
编辑#4:当我尝试循环数据时,在返回数据后,使用@Svyatoslav Danyliv 的答案中的查询示例,我得到了这个:
我的桌子:
flutter - 当您不知道文档名称时访问文档
我正在学习颤振并创建我的第一个移动应用程序。在这个过程中,我从你们中的许多人那里学到了很多东西。
我有一个新问题。我的应用在 Firestore 的某个集合中有多个文档。我想从一个文档中访问数据,但我不知道文档名称。当我不知道文档名称时,如何在颤振中访问文档?
reactjs - 在滚动视图中渲染反应导航屏幕
我正在构建一个反应原生应用程序,我想在其中添加一个滚动视图作为所有 UI 屏幕的包装器。我已经将Stack.NavigatorScrollView 包装了,但内容被剪辑在屏幕底部,屏幕结束后没有可见的内容。请看下面的代码
应用程序.tsx
内容.tsx
docker - 尝试使用 docker:dind 时 gitlab-ci 失败
我有以下 gitlab-ci.yml:
它失败并出现以下错误:
$ docker info 52Client: 53 Debug Mode: false 54Server: 55ERROR: error during connect: Get http://docker:2375/v1.40/info: dial tcp: lookup docker on 192.168.65.1:53: no such host 56errors pretty打印信息 57 清理基于文件的变量 00:01 58错误:作业失败:退出代码 1
更进一步......在失败之前,我还看到了这些消息:
我试图在托管 GitLab Runner 的机器上手动执行此操作......我认为缺少的是我需要以某种方式指定“--privledged”标志。这是我手动运行的,它可以工作:
r - Dbplyr:in_schema 为两个不同的数据库使用相同的连接
由于这里不解释的原因,我需要使用同一个连接对象来读取 dbplyr 中的两个数据库。我找到了一些在线资源,但我没有做对。请看下面的reprex。谁能告诉我我做错了什么?非常感谢!
由reprex 包于 2020-12-24 创建(v0.3.0)
c# - 在 API 基本路径 .net 核心中包含占位符
想知道如何在 API 基本路径中包含占位符/变量,您会看到在 azure devops 中使用的类似内容,例如:https://dev.azure.com/{company-name}/. 您将如何设置您的 API 以获取基本路径开始的上下文。
我想要实现的是让我的 API 具有执行 API 调用的帐户的上下文,而不必成为 API 请求正文的一部分。我的 API 的格式是https://some-company.com/{account}/_apis/some-api/controller/.
docker - 如何使用 vue 中构建的系统环境变量?
我想使用操作系统环境变量在 vue 中构建我的项目。
我知道该.env文件可以在 root 中使用,但就我而言,我希望 vue 从操作系统中获取它们,在我的情况下使用 docker 环境变量。
我怎么才能得到它?
php - 我是 php 新手。我收到此错误,不知道如何纠正。谁能帮我这个?
推断属性 即使可以从其他标签推断出值,也应显式提供“og:image”属性。
缺少属性缺少以下必需属性:og:url、og:type、og:title、og:image、og:description、fb:app_id在此处输入图像描述
objective-c - 是否可以通过 [NSString drawAtPoint] 绘制文本或在 Metal 视图中显示 NSButton?
我需要在我的 Metal 应用程序中呈现一些文本。与其手动进行,我更愿意使用 Apple 的文本渲染 API。
在一个简单的空窗口中调用此代码将drawRect打印字符串:
但这在具有金属视图的窗口中不起作用。我想一切都会被冲洗掉?
是否可以?在 Metal 视图上显示按钮 (NSButton) 也是如此。
谢谢。
mysql - Owncloud seems to ignore dbtype in config.php (using docker)
I’m an Owncloud newbie and would like to deploy a containerized version of Owncloud on my NAS (QNAP) as a private alternative to Dropbox.
I can run a docker container of Owncloud without any problem using the default sqlite database: I access the GUI, create the admin user, browse the file structure, etc.
But I’d like to switch to Mysql and I was so far unable to do as Owncloud “seems” to ignore the settings in config.php.
I created a MySQL instance (MariaDB) in a separate container and added an empty owncloud-reserved database to it: I verified that from the Owncloud container I can successfully login into the MySQL’s via the command line using the appropriate credentials, so the database is reachable.
Following some instructions I found online I edited file config.php and changed field “installed” in variable $CONFIG from “true” to “false”: this triggers the db configuration wizard upon login.
In the wizard I select “MySQL” and await the completion of the setup procedure.
When it’s done I checked that:
Owncloudtables have been created in the MariaDB database (the db was empty before running the wizard)The
config.phpfile has been modified and now I see allmysql dbsettings, particulary:'dbtype' => 'mysql', (the file showed before the sqlite settings)
So apparently the wizard did his stuff.
Despite the above, if I go to the Settings page of my admin user, under General I still see the red warning: “<code>SQLite is used as database…etc”.
For testing, I added a new user and indeed the data are still stored in the sqlite file rather than MySQL
So my conclusion is that Owncloud is ignoring config.php in my setup.
Things I tried to no avail:
Recreating the Owncloud container multiple times
Restart the container after the database change
Running the suggested sqlite to mysql migration script as per the owncloud official documentation
What am I missing? Thanks in advance Regards Sergio
c - Merge/Inline Structs
Size of STRA is 4 bytes, and size of STRB is 8 bytes.
Size of STRA is 4 bytes, and size of STRB is 4 bytes.
Can I make STRB 4 bytes while still using STRA inside it?
visual-studio-code - Intellisense not picking up Redux store type
I'm following a tutorial on Redux and in the video the person sets up a store and goes to type store.subscribe and Intellisense picks up that it's a redux store and shows the subscribe method on it. When I try to do this, following the exact same code, my Intellisense picks up the store as any. Am I missing an extension or something? I've tried a few react/redux extensions but they don't seem to pick up store as being redux.
Code here: https://pastebin.com/9cAbHzSR
docker - Fail to run DAG on Airflow 1.10.14 running with docker-compose on official Apache\Airflow image
I've been trying to set Airflow 1.10.14 to execute Python based process, on docker container using docker-compose. The host is Ubuntu 18 VM.
My Dockerfile:
Then I execute:
And my docker-compose.yml is:
I also use the airflow.cfg as appear in here (with minor changes) In the first run I execute in 3 steps in separated terminals:
I'm able to access the Airflow UI and turn on the DAG but first step fails immediately with the following error:
What am I missing here? any help will be appreciated...
java - 使用 Jetty 11 设置 websocket
我正在尝试从 Jetty 9.4 迁移到 Jetty 11(可能为时过早?)并且未能调整代码以设置 websocket。我在 9.4 中实现这一点的方式如下:
由于不再有 WebSocketServlet 类,我摆弄了一下,找到了 JettyWebSocketServlet 类。根据它的JavaDoc,我认为它应该如下所示:
但是 addMapping 的行实际上从未执行过。JettyWebSocketServletFactory 也没有 JettyWebSocketServlet 的 JavaDoc 所建议的名为 setDefaultMaxFrameSize 的方法。
我似乎能在网上找到的只是 Jetty <= 9.4,甚至是https://github.com/jetty-project/embedded-jetty-websocket-examples。
任何帮助将不胜感激。
angular - 在反应式表单中,如何创建一个自定义验证器来验证 formGroup 数组是否没有值?
我的意思是我有一个包含动态订单项目集合的订单页面。我想要求用户在该数组中至少有一项。我了解自定义验证器的简单用法,但在这种情况下,我验证的不是单个控件,而是一个数组。我怎么说'如果数组中没有值则给出错误'?
对于一个简单的情况,我会做类似的事情
编辑1:
我更近了。我确定错误何时存在。但是我的模板是错误的。如何查看模板中的错误?






