在创建dockerFile文件中出现/bin/sh: rm: command not found
  • 通过学习dockerfile命令试着自己做一下练习,在联系过程中出现 /bin/sh: rm: command not found
  • 代码
FROM centos:latest
MAINTAINER my<my@163.com>
ENV PATH /tmp
WORKDIR $PATH

RUN rm -rf /tmp

CMD /bin/bash
  • Build过程

Sending build context to Docker daemon 2.048 kB
Step 1/6 : FROM centos:latest
 ---> 1e1148e4cc2c
Step 2/6 : MAINTAINER my<my@163.com>
 ---> Running in dc6073af05a2
 ---> b6f7e3b7bca8
Removing intermediate container dc6073af05a2
Step 3/6 : ENV PATH /tmp
 ---> Running in 7d000413c304
 ---> f643d6b20259
Removing intermediate container 7d000413c304
Step 4/6 : WORKDIR $PATH
 ---> 340ef4b29f1c
Removing intermediate container 658c7d7a96b9
Step 5/6 : RUN rm -rf /tmp
 ---> Running in 3aad9ab202d1

/bin/sh: rm: command not found
The command '/bin/sh -c rm -rf /tmp' returned a non-zero code: 127

以上请大神指点迷津

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Dockerfile Image命令'/ bin / sh -c apt-get install -y mysqld-server'返回非零代码:100

<div class="post-text" itemprop="text"> <p>I want to make a docker image with this spec:</p> <ol> <li>Ubuntu : 16.04 / Latest</li> <li>PHP 7.x</li> <li>nginx : Latest mySQL 5.x</li> <li>Expose Port 80 &amp; 443 </li> <li>Directory / Source</li> </ol> <p>Optional :</p> <ol> <li>VIM</li> <li>PHP Composer</li> </ol> <p>My Dockerfile:</p> <pre><code># Download base image ubuntu 16.04 FROM ubuntu:16.04 # Update Ubuntu Software repository RUN apt-get update # Install PHP, nginx, mySQL RUN apt-get install -y nginx php7.0-fpm &amp;&amp; \ rm -rf /var/lib/apt/lists/* # Install MySQL and set default root password RUN echo 'mysql-server mysql-server/root_password password mypassword' | debconf-set-selections RUN echo 'mysql-server mysql-server/root_password_again password mypassword' | debconf-set-selections RUN apt-get install -y mysql-server # Define the ENV variable ENV nginx_vhost /etc/nginx/sites-available/default ENV php_conf /etc/php/7.0/fpm/php.ini ENV nginx_conf /etc/nginx/nginx.conf # Enable php-fpm on nginx virtualhost configuration COPY default ${nginx_vhost} RUN sed -i -e 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/g' ${php_conf} &amp;&amp; \ echo " daemon off;" &gt;&gt; ${nginx_conf} RUN mkdir -p /run/php &amp;&amp; \ chown -R www-data:www-data /var/www/html &amp;&amp; \ chown -R www-data:www-data /run/php # Volume configuration VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d", "/var/log/nginx", "/var/www/html"] # Configure Services and Port COPY start.sh /start.sh CMD ["./start.sh"] EXPOSE 80 443 </code></pre> <p>I get this error message when I built it</p> <pre><code>Sending build context to Docker daemon 5.632 kB Step 1 : FROM ubuntu:16.04 ---&gt; 2d696327ab2e Step 2 : RUN apt-get update ---&gt; Using cache ---&gt; b58709c2b7b9 Step 3 : RUN apt-get install -y nginx php7.0-fpm &amp;&amp; rm -rf /var/lib/apt/lists/* ---&gt; Using cache ---&gt; 3d58b4fac924 Step 4 : RUN echo 'mysql-server mysql-server/root_password password mypassword' | debconf-set-selections ---&gt; Using cache ---&gt; 85256efe3bd3 Step 5 : RUN echo 'mysql-server mysql-server/root_password_again password mypassword' | debconf-set-selections ---&gt; Using cache ---&gt; d1f71eeacbe2 Step 6 : RUN apt-get install -y mysqld-server ---&gt; Running in 9dba6ce0c59a Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package mysqld-server The command '/bin/sh -c apt-get install -y mysqld-server' returned a non-zero code: 100 </code></pre> <p>How can I fix it?</p> <p>Thanks</p> </div>

Docker-entrypoint.sh导致使用golang的ARM映像“未找到”

<div class="post-text" itemprop="text"> <p>My problem is that I get an error when running my container on an ARM arch system(RaspberryPI with Raspbian). Image was built on that same Raspberry. </p> <p>This is my <code>dockerfile</code>:</p> <pre><code>FROM arm32v7/golang COPY qemu-arm-static /usr/bin ENV STATUSOK_VERSION 0.1.1 RUN apt-get update \ &amp;&amp; apt-get install -y unzip \ &amp;&amp; wget https://github.com/sanathp/statusok/releases/download/$STATUSOK_VERSION/statusok_linux.zip \ &amp;&amp; unzip statusok_linux.zip \ &amp;&amp; mv ./statusok_linux/statusok /go/bin/StatusOk \ &amp;&amp; rm -rf ./statusok_linux* \ &amp;&amp; apt-get remove -y unzip git \ &amp;&amp; apt-get autoremove -y \ &amp;&amp; apt-get clean \ &amp;&amp; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* VOLUME /config COPY ./docker-entrypoint.sh /docker-entrypoint.sh ENTRYPOINT /docker-entrypoint.sh </code></pre> <p>I'm able to succesfully build this on a RaspberryPI running Raspbian:</p> <pre><code>root@raspberrypi:~/armstatusok# docker build . -t armstatusok Sending build context to Docker daemon 6.656kB Step 1/7 : FROM arm32v7/golang ---&gt; 8bbfdfd01a06 Step 2/7 : COPY qemu-arm-static /usr/bin ---&gt; Using cache ---&gt; 2572fd1e03a0 Step 3/7 : ENV STATUSOK_VERSION 0.1.1 ---&gt; Using cache ---&gt; 25d39a4c6eb5 Step 4/7 : RUN apt-get update &amp;&amp; apt-get install -y unzip &amp;&amp; wget https://github.com/sanathp/statusok/releases/download/$STATUSOK_VERSION/statusok_linux.zip &amp;&amp; unzip statusok_linux.zip &amp;&amp; mv ./statusok_linux/statusok /go/bin/StatusOk &amp;&amp; rm -rf ./statusok_linux* &amp;&amp; apt-get remove -y unzip git &amp;&amp; apt-get autoremove -y &amp;&amp; apt-get clean &amp;&amp; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ---&gt; Using cache ---&gt; bfb1cfa9a985 Step 5/7 : VOLUME /config ---&gt; Using cache ---&gt; 3bfbce28329b Step 6/7 : COPY ./docker-entrypoint.sh /docker-entrypoint.sh ---&gt; Using cache ---&gt; a1795ca4f40c Step 7/7 : ENTRYPOINT /docker-entrypoint.sh ---&gt; Using cache ---&gt; d0ce74911ba3 Successfully built d0ce74911ba3 Successfully tagged armstatusok:latest </code></pre> <p>Next step is to run it, and where I get into trouble:</p> <pre><code>root@raspberrypi:~/armstatusok# docker run --name=armstatusok -v $PWD:/config armstatusok /docker-entrypoint.sh: 1: /docker-entrypoint.sh: /go/bin/StatusOk: not found </code></pre> <p>I went into the container commenting line one of the <code>docker-entrypoint.sh</code> and checked if <code>/go/bin/StatusOk</code> was actually there, and it was.</p> <p>My <code>docker-entrypoint.sh</code>:</p> <pre><code>root@raspberrypi:~/armstatusok# cat docker-entrypoint.sh /go/bin/StatusOk --config /config/config.json </code></pre> <p>Now my question is, does anybody have a clue where to start? I also tested this dockerfile on x86 arch, and there it worked. I only changed the FROM line to the x86 flavour and removed the <code>COPY qemu-arm-static /usr/bin</code> since that line is there to make it work on ARM arch, according to documentation.</p> </div>

/ bin / sh:1:转到:推送到heroku时找不到

<div class="post-text" itemprop="text"> <p>I'm trying to use React Frontend and Go Backend language. </p> <p>I have to Go installed locally and I can run commands like <code>go run main.go</code> or <code>go build</code>. But when I try to push to Heroku, I get the following error:</p> <pre><code>$ rm -rf index &amp;&amp; go build -o index remote: /bin/sh: 1: go: not found remote: error Command failed with exit code 127. remote: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. remote: error Command failed with exit code 127. remote: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. remote: remote: -----&gt; Build failed </code></pre> <p>This is my package.json:</p> <pre><code>{ "name": "fullstack-course", "version": "1.0.0", "description": "", "main": "index.go", "scripts": { "client": "rm -rf build/ &amp;&amp; webpack --env.mode production", "server": "rm -rf index &amp;&amp; go build -o index", "start": "./index", "heroku-postbuild": "yarn run client &amp;&amp; yarn run server" }, "engines": { "node": "10.x", "npm": "6.9.x", "yarn": "1.x" }, "repository": { "type": "git", }, "author": "", "license": "ISC", "dependencies": {...} } </code></pre> <p>Why when running locally it works, but when pushing it to Heroku it fails?</p> <p>How can I fix this?</p> <p>Thanks</p> </div>

安装libvirt是make的时候没问题,但是在make install是出现很多错误!

/usr/bin/install -c -m 0644 ./$f /usr/local/share/doc/libvirt-1.2.2/html; done /usr/bin/install: cannot stat `./404.html': No such file or directory /usr/bin/install: cannot stat `./acl.html': No such file or directory /usr/bin/install: cannot stat `./aclpolkit.html': No such file or directory /usr/bin/install: cannot stat `./api.html': No such file or directory /usr/bin/install: cannot stat `./api_extension.html': No such file or directory /usr/bin/install: cannot stat `./apps.html': No such file or directory /usr/bin/install: cannot stat `./archdomain.html': No such file or directory /usr/bin/install: cannot stat `./architecture.html': No such file or directory /usr/bin/install: cannot stat `./archnetwork.html': No such file or directory /usr/bin/install: cannot stat `./archnode.html': No such file or directory /usr/bin/install: cannot stat `./archstorage.html': No such file or directory /usr/bin/install: cannot stat `./auditlog.html': No such file or directory /usr/bin/install: cannot stat `./auth.html': No such file or directory /usr/bin/install: cannot stat `./bindings.html': No such file or directory /usr/bin/install: cannot stat `./bugs.html': No such file or directory /usr/bin/install: cannot stat `./cgroups.html': No such file or directory /usr/bin/install: cannot stat `./compiling.html': No such file or directory /usr/bin/install: cannot stat `./contact.html': No such file or directory /usr/bin/install: cannot stat `./csharp.html': No such file or directory /usr/bin/install: cannot stat `./deployment.html': No such file or directory /usr/bin/install: cannot stat `./devguide.html': No such file or directory /usr/bin/install: cannot stat `./docs.html': No such file or directory /usr/bin/install: cannot stat `./downloads.html': No such file or directory /usr/bin/install: cannot stat `./drivers.html': No such file or directory /usr/bin/install: cannot stat `./drvesx.html': No such file or directory /usr/bin/install: cannot stat `./drvhyperv.html': No such file or directory /usr/bin/install: cannot stat `./drvlxc.html': No such file or directory /usr/bin/install: cannot stat `./drvopenvz.html': No such file or directory /usr/bin/install: cannot stat `./drvparallels.html': No such file or directory /usr/bin/install: cannot stat `./drvphyp.html': No such file or directory /usr/bin/install: cannot stat `./drvqemu.html': No such file or directory /usr/bin/install: cannot stat `./drvremote.html': No such file or directory /usr/bin/install: cannot stat `./drvtest.html': No such file or directory /usr/bin/install: cannot stat `./drvuml.html': No such file or directory /usr/bin/install: cannot stat `./drvvbox.html': No such file or directory /usr/bin/install: cannot stat `./drvvmware.html': No such file or directory /usr/bin/install: cannot stat `./drvxen.html': No such file or directory /usr/bin/install: cannot stat `./errors.html': No such file or directory /usr/bin/install: cannot stat `./firewall.html': No such file or directory /usr/bin/install: cannot stat `./format.html': No such file or directory /usr/bin/install: cannot stat `./formatcaps.html': No such file or directory /usr/bin/install: cannot stat `./formatdomain.html': No such file or directory /usr/bin/install: cannot stat `./formatnetwork.html': No such file or directory /usr/bin/install: cannot stat `./formatnode.html': No such file or directory /usr/bin/install: cannot stat `./formatnwfilter.html': No such file or directory /usr/bin/install: cannot stat `./formatsecret.html': No such file or directory /usr/bin/install: cannot stat `./formatsnapshot.html': No such file or directory /usr/bin/install: cannot stat `./formatstorage.html': No such file or directory /usr/bin/install: cannot stat `./formatstorageencryption.html': No such file or directory /usr/bin/install: cannot stat `./goals.html': No such file or directory /usr/bin/install: cannot stat `./governance.html': No such file or directory /usr/bin/install: cannot stat `./hacking.html': No such file or directory /usr/bin/install: cannot stat `./hooks.html': No such file or directory /usr/bin/install: cannot stat `./hvsupport.html': No such file or directory /usr/bin/install: cannot stat `./index.html': No such file or directory /usr/bin/install: cannot stat `./internals.html': No such file or directory /usr/bin/install: cannot stat `./intro.html': No such file or directory /usr/bin/install: cannot stat `./java.html': No such file or directory /usr/bin/install: cannot stat `./locking.html': No such file or directory /usr/bin/install: cannot stat `./logging.html': No such file or directory /usr/bin/install: cannot stat `./migration.html': No such file or directory /usr/bin/install: cannot stat `./news.html': No such file or directory /usr/bin/install: cannot stat `./pending.html': No such file or directory /usr/bin/install: cannot stat `./php.html': No such file or directory /usr/bin/install: cannot stat `./python.html': No such file or directory /usr/bin/install: cannot stat `./relatedlinks.html': No such file or directory /usr/bin/install: cannot stat `./remote.html': No such file or directory /usr/bin/install: cannot stat `./secureusage.html': No such file or directory /usr/bin/install: cannot stat `./securityprocess.html': No such file or directory /usr/bin/install: cannot stat `./sitemap.html': No such file or directory /usr/bin/install: cannot stat `./storage.html': No such file or directory /usr/bin/install: cannot stat `./testapi.html': No such file or directory /usr/bin/install: cannot stat `./testsuites.html': No such file or directory /usr/bin/install: cannot stat `./testtck.html': No such file or directory /usr/bin/install: cannot stat `./todo.html': No such file or directory /usr/bin/install: cannot stat `./uri.html': No such file or directory /usr/bin/install: cannot stat `./virshcmdref.html': No such file or directory /usr/bin/install: cannot stat `./windows.html': No such file or directory /usr/bin/install: cannot stat `./todo.html': No such file or directory /usr/bin/install: cannot stat `./hvsupport.html': No such file or directory /bin/bash /root/libvirt/libvirt/build-aux/install-sh -d /usr/local/share/doc/libvirt-1.2.2/html/html for h in html/index.html html/libvirt-libvirt.html html/libvirt-virterror.html; do \ /usr/bin/install -c -m 0644 ./$h /usr/local/share/doc/libvirt-1.2.2/html/html; done for p in html/left.png html/up.png html/home.png html/right.png; do \ /usr/bin/install -c -m 0644 ./$p /usr/local/share/doc/libvirt-1.2.2/html/html; done /bin/bash /root/libvirt/libvirt/build-aux/install-sh -d /usr/local/share/doc/libvirt-1.2.2/html/internals for f in internals/command.html internals/locking.html internals/rpc.html; do \ /usr/bin/install -c -m 0644 ./$f /usr/local/share/doc/libvirt-1.2.2/html/internals; done /usr/bin/install: cannot stat `./internals/command.html': No such file or directory /usr/bin/install: cannot stat `./internals/locking.html': No such file or directory /usr/bin/install: cannot stat `./internals/rpc.html': No such file or directory make[3]: *** [install-data-local] Error 1 make[3]: Leaving directory `/root/libvirt/libvirt/docs' make[2]: *** [install-am] Error 2 rm news.html.tmp formatstorage.html.tmp goals.html.tmp formatsecret.html.tmp hooks.html.tmp drvopenvz.html.tmp testtck.html.tmp drvesx.html.tmp apps.html.tmp internals/locking.html.tmp formatdomain.html.tmp internals/command.html.tmp drvvbox.html.tmp csharp.html.tmp java.html.tmp archnetwork.html.tmp formatstorageencryption.html.tmp php.html.tmp drvhyperv.html.tmp errors.html.tmp aclpolkit.html.tmp hacking.html.tmp storage.html.tmp testsuites.html.tmp format.html.tmp cgroups.html.tmp drvlxc.html.tmp windows.html.tmp api.html.tmp internals/rpc.html.tmp formatnwfilter.html.tmp relatedlinks.html.tmp formatcaps.html.tmp archdomain.html.tmp contact.html.tmp auth.html.tmp drivers.html.tmp archnode.html.tmp bugs.html.tmp downloads.html.tmp drvphyp.html.tmp logging.html.tmp locking.html.tmp testapi.html.tmp remote.html.tmp drvuml.html.tmp intro.html.tmp migration.html.tmp acl.html.tmp hvsupport.html.tmp sitemap.html.tmp drvqemu.html.tmp drvparallels.html.tmp drvxen.html.tmp deployment.html.tmp uri.html.tmp index.html.tmp bindings.html.tmp drvvmware.html.tmp devguide.html.tmp drvtest.html.tmp firewall.html.tmp architecture.html.tmp archstorage.html.tmp todo.html.tmp formatsnapshot.html.tmp internals.html.tmp pending.html.tmp formatnetwork.html.tmp api_extension.html.tmp securityprocess.html.tmp governance.html.tmp 404.html.tmp docs.html.tmp virshcmdref.html.tmp auditlog.html.tmp secureusage.html.tmp python.html.tmp drvremote.html.tmp formatnode.html.tmp compiling.html.tmp make[2]: Leaving directory `/root/libvirt/libvirt/docs' make[1]: *** [install-recursive] Error 1 make[1]: Leaving directory `/root/libvirt/libvirt/docs' make: *** [install-recursive] Error 1

shell 报command not found

用户是csh 我写的脚本里用的解释器是#!/bin/bash 但是我写的一个参数a=b缺报错 求大神解释一下

Linux远程执行sh脚本出错

首先我在一台机器上执行一个脚本,能在本机正常执行成功,脚本的功能为删除之前的war包备份文件,解压最新war包并通过发布到tomcat上 截取片段片段为 #/usr/bin/sh if [ -d /opt/apache-tomcat-7.0.41/publish/testbak ] then echo "delete testbak" rm -rf /opt/apache-tomcat-7.0.41/publish/testbak fi if [ -f /opt/apache-tomcat-7.0.41/publish/test.war ] then mkdir /opt/apache-tomcat-7.0.41/publish/test echo "mkdir success" mv /opt/apache-tomcat-7.0.41/publish/test.war /opt/apache-tomcat-7.0.41/publish/test cd /opt/apache-tomcat-7.0.41/publish/test jar xf /opt/apache-tomcat-7.0.41/publish/test/test.war mv /opt/apache-tomcat-7.0.41/publish/test/test.war .. cd .. else echo "test.war does not exist, quit" exit 1 fi echo "stop tomcat..." cd ../bin sh shutdown.sh 然后我通过ssh usr@ip "cd 脚本路径 ; ./test.sh" 它就报错了 ``` test.sh: line 21: jar: command not found stop tomcat... /opt/apache-tomcat-7.0.41/bin/catalina.sh: line 438: /was/jdk/jdk1.6.0_35/bin/java: No such file or directory cp: cannot stat `testbak/WEB-INF/classes/*.properties': No such file or dire_ctory ``` _我这边也用了绝对路径,不清楚为何会报这样的错_

PHP Docker映像安装事件扩展失败

<div class="post-text" itemprop="text"> <p>I'm trying to install the <code>event</code> extension in <strong>PHP Docker</strong> using <code>pecl install event-2.5.3</code>, however, it fails with the error:</p> <blockquote> <p><strong>Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20160303/event.so: php_sockets_le_socket: symbol not found in Unknown on line 0</strong>. </p> </blockquote> <p>My Dockerfile:</p> <pre><code>FROM php:7.1.30-cli-alpine3.9 RUN apk --update add \ autoconf \ build-base \ linux-headers \ libevent-dev \ openldap-dev \ imagemagick-dev &amp;&amp; \ docker-php-ext-install pdo_mysql opcache sockets &amp;&amp; \ docker-php-ext-enable sockets &amp;&amp; \ pecl install event-2.5.3 &amp;&amp; \ docker-php-ext-enable event &amp;&amp; \ docker-php-ext-enable opcache \ &amp;&amp; rm -rf /var/cache/apk/* </code></pre> <p>This problem has puzzled me for a long time. Any suggestions?</p> </div>

java执行sh脚本的问题

如何知道java执行的脚本是否成功呢?在赋予权限后发现符合linux命名规范的脚本都能 执行,应该通过何种方法知道执行sh脚本失败的情况?

去Dockerfile中的mongo-go-driver崩溃

<div class="post-text" itemprop="text"> <p>I have a little problem with my Go service. I'm new to Go and I just want to dockerize a little service that just connect to a mongodb instance.</p> <p>My code works fine locally. So here is my Dockerfile:</p> <pre><code># build stage FROM golang:alpine AS build-env RUN apk add --no-cache git ADD . . RUN go get -v -u go.mongodb.org/mongo-driver RUN go build -o mongotest # final stage FROM alpine WORKDIR /app COPY --from=build-env ./go/mongotest . RUN apk update &amp;&amp; apk add ca-certificates &amp;&amp; rm -rf /var/cache/apk/* EXPOSE 8000 CMD ["./mongotest"] </code></pre> <p>When I build it, I have this error message :</p> <pre class="lang-none prettyprint-override"><code>Step 6/18 : RUN go get -v -u go.mongodb.org/mongo-driver ---&gt; Running in 4c45c601800d Fetching https://go.mongodb.org/mongo-driver?go-get=1 Parsing meta tags from https://go.mongodb.org/mongo-driver?go-get=1 (status code 200) get "go.mongodb.org/mongo-driver": found meta tag get.metaImport{Prefix:"go.mongodb.org/mongo-driver", VCS:"git", RepoRoot:"https://github.com/mongodb/mongo-go-driver.git"} at https://go.mongodb.org/mongo-driver?go-get=1 go.mongodb.org/mongo-driver (download) package go.mongodb.org/mongo-driver: no Go files in /go/src/go.mongodb.org/mongo-driver The command '/bin/sh -c go get -v -u go.mongodb.org/mongo-driver' returned a non-zero code: 1 </code></pre> <p><code>no Go files in /go/src</code> ... ok, what can I do with that?</p> <p>The strange thing is that if I replace </p> <p><code>RUN go get -d -u go.mongodb.org/mongo-driver</code></p> <p>by </p> <p><code>RUN go get -d -u github.com/gorilla/mux</code></p> <p>it works!</p> <p>Is there a problem with mongo driver repo?</p> </div>

centos7上用rpmbuild建立rpm安装包问题(急)

centos7.1 php-5.6.25 $ ls rpmbuild/ BUILD BUILDROOT RPMS SOURCES SPECS SRPMS $cat rpmbuild/SPECS/php.spec Name: php Version: 5.6.25 Release: 1%{?dist} Summary: compiled from 5.6.25 by Kevin Group: System Environment/Daemons License: GPL URL: https://secure.php.net Source0: php-5.6.25.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: gcc, gcc-c++, openssl-devel Requires: wireshark-gnome %description php server. Compiled from 5.6.25 by Kevin %prep %setup -q %build ./configure '--with-libdir=lib64' '--prefix=/usr/local/php5.6' '--with-fpm-systemd' '--enable-fpm' '--enable-mbstring' '--with-mysql' '--with-mysqli' '--with-pdo-mysql' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-curl' '--with-openssl' '--with-mcrypt' '--enable-zip' '--enable-intl' make %{?_smp_mflags} %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %defattr(-,root,root,-) /usr/local/php5.6/bin/* /usr/local/php5.6/sbin/* /usr/local/php5.6/include/* /usr/local/php5.6/php/php/fpm/* /usr/local/php5.6/php/man/man1/* /usr/local/php5.6/php/man/man8/* /usr/local/php5.6/lib/php/* /usr/local/php5.6/lib/php/extensions/* /usr/local/php5.6/lib/php/extensions/no-debug-non-zts-20131226/* /usr/local/php5.6/lib/php/build/* /usr/local/php5.6/lib/php/build/shtool/* /usr/local/php5.6/lib/php/.registry/* /usr/local/php5.6/lib/php/.channels/* /usr/local/php5.6/lib/php/Archive/* /usr/local/php5.6/lib/php/doc/* /usr/local/php5.6/lib/php/doc/Archive_Tar/* /usr/local/php5.6/lib/php/doc/Archive_Tar/docs/* /usr/local/php5.6/lib/php/doc/Structures_Graph/* /usr/local/php5.6/lib/php/doc/Structures_Graph/docs/* /usr/local/php5.6/lib/php/doc/Structures_Graph/docs/tutorials/* /usr/local/php5.6/lib/php/doc/Structures_Graph/docs/tutorials/Structures_Graph/* /usr/local/php5.6/lib/php/doc/Structures_Graph/LICENSE/* /usr/local/php5.6/lib/php/doc/XML_Util/* /usr/local/php5.6/lib/php/doc/XML_Util/examples/* /usr/local/php5.6/lib/php/doc/PEAR/* /usr/local/php5.6/lib/php/doc/PEAR/LICENSE/* /usr/local/php5.6/lib/php/doc/PEAR/INSTALL/* /usr/local/php5.6/lib/php/Console/* /usr/local/php5.6/lib/php/test/* /usr/local/php5.6/lib/php/test/Console_Getopt/* /usr/local/php5.6/lib/php/test/Console_Getopt/tests/* /usr/local/php5.6/lib/php/test/Structures_Graph/* /usr/local/php5.6/lib/php/test/Structures_Graph/tests/* /usr/local/php5.6/lib/php/test/XML_Util/* /usr/local/php5.6/lib/php/test/XML_Util/tests/* /usr/local/php5.6/lib/php/Structures/* /usr/local/php5.6/lib/php/Structures/Graph/* /usr/local/php5.6/lib/php/Structures/Graph/Manipulator/* /usr/local/php5.6/lib/php/XML/* /usr/local/php5.6/lib/php/OS/* /usr/local/php5.6/lib/php/PEAR/* /usr/local/php5.6/lib/php/PEAR/ChannelFile/* /usr/local/php5.6/lib/php/PEAR/Command/* /usr/local/php5.6/lib/php/PEAR/Downloader/* /usr/local/php5.6/lib/php/PEAR/Frontend/* /usr/local/php5.6/lib/php/PEAR/Installer/* /usr/local/php5.6/lib/php/PEAR/Installer/Role/* /usr/local/php5.6/lib/php/PEAR/PackageFile/* /usr/local/php5.6/lib/php/PEAR/PackageFile/Generator/* /usr/local/php5.6/lib/php/PEAR/PackageFile/Parser/* /usr/local/php5.6/lib/php/PEAR/PackageFile/v2/* /usr/local/php5.6/lib/php/PEAR/REST/* /usr/local/php5.6/lib/php/PEAR/Task/* /usr/local/php5.6/lib/php/PEAR/Task/Postinstallscript/* /usr/local/php5.6/lib/php/PEAR/Task/Replace/* /usr/local/php5.6/lib/php/PEAR/Task/Unixeol/* /usr/local/php5.6/lib/php/PEAR/Task/Windowseol/* /usr/local/php5.6/lib/php/PEAR/Validator/* /usr/local/php5.6/lib/php/data/* /usr/local/php5.6/lib/php/data/PEAR/* %config /usr/local/php5.6/etc/* /usr/local/php5.6/var/run/* /usr/local/php5.6/lib/* %dir /usr/local/php5.6/var/log/ %post cp /usr/local/php5.6/etc/php-fpm.conf.default /usr/local/php5.6/etc/php-fpm.conf ln -s /usr/local/php5.6/bin/php /usr/bin/php %changelog * Tue Aug 30 2016 Kevin<kevin_liao@163.com> 5.6.25 - first rpm from php-5.6.25 然后用一个user用户为centos,没在root下执行 $ rpmbuild -ba rpmbuild/SPECS/php.spec 最后报错 Build complete. Don't forget to run 'make test'. + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.QjJHDq + umask 022 + cd /home/centos/rpmbuild/BUILD + '[' /home/centos/rpmbuild/BUILDROOT/php-5.6.25-1.el7.centos.x86_64 '!=' / ']' + rm -rf /home/centos/rpmbuild/BUILDROOT/php-5.6.25-1.el7.centos.x86_64 ++ dirname /home/centos/rpmbuild/BUILDROOT/php-5.6.25-1.el7.centos.x86_64 + mkdir -p /home/centos/rpmbuild/BUILDROOT + mkdir /home/centos/rpmbuild/BUILDROOT/php-5.6.25-1.el7.centos.x86_64 + cd php-5.6.25 + rm -rf /home/centos/rpmbuild/BUILDROOT/php-5.6.25-1.el7.centos.x86_64 + make install DESTDIR=/home/centos/rpmbuild/BUILDROOT/php-5.6.25-1.el7.centos.x86_64 Installing shared extensions: /usr/local/php5.6/lib/php/extensions/no-debug-non-zts-20131226/ Installing PHP CLI binary: /usr/local/php5.6/bin/ Installing PHP CLI man page: /usr/local/php5.6/php/man/man1/ Installing PHP FPM binary: /usr/local/php5.6/sbin/ Installing PHP FPM config: /usr/local/php5.6/etc/ Installing PHP FPM man page: /usr/local/php5.6/php/man/man8/ Installing PHP FPM status page: /usr/local/php5.6/php/php/fpm/ Installing PHP CGI binary: /usr/local/php5.6/bin/ Installing PHP CGI man page: /usr/local/php5.6/php/man/man1/ Installing build environment: /usr/local/php5.6/lib/php/build/ Installing header files: /usr/local/php5.6/include/php/ Installing helper programs: /usr/local/php5.6/bin/ program: phpize program: php-config Installing man pages: /usr/local/php5.6/php/man/man1/ page: phpize.1 page: php-config.1 Installing PEAR environment: /usr/local/php5.6/lib/php/ [PEAR] Archive_Tar - already installed: 1.4.0 [PEAR] Console_Getopt - already installed: 1.4.1 [PEAR] Structures_Graph- already installed: 1.1.1 [PEAR] XML_Util - already installed: 1.3.0 [PEAR] PEAR - already installed: 1.10.1 Wrote PEAR system config file at: /usr/local/php5.6/etc/pear.conf You may want to add: /usr/local/php5.6/lib/php to your php.ini include_path /home/centos/rpmbuild/BUILD/php-5.6.25/build/shtool install -c ext/phar/phar.phar /usr/local/php5.6/bin ln -s -f phar.phar /usr/local/php5.6/bin/phar Installing PDO headers: /usr/local/php5.6/include/php/ext/pdo/ + /usr/lib/rpm/find-debuginfo.sh --strict-build-id -m --run-dwz --dwz-low-mem-die-limit 10000000 --dwz-max-die-limit 110000000 /home/centos/rpmbuild/BUILD/php-5.6.25 find: '/home/centos/rpmbuild/BUILDROOT/php-5.6.25-1.el7.centos.x86_64': No such file or directory error: Bad exit status from /var/tmp/rpm-tmp.QjJHDq (%install) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.QjJHDq (%install)

Supervisord | 不支持的系统调用

<div class="post-text" itemprop="text"> <p>I try to use supervisord in order to link PHP &amp; Nginx, my container runs locally but once pushed to Cloud Run, I go a 502 error which informs me that the PHP socket can't be found.</p> <p>I have a non-Alpine image which runs with the same configuration and everything goes right, I've tried to use the PHP default port (9000) and everything works but I've seen that using Unix socket can be a better idea. </p> <p>Here's the Dockerfile used: </p> <pre><code>FROM php:7.3.5-alpine3.9 as base ARG REVISION LABEL org.opencontainers.image.authors=contact@guillaumeloulier.fr LABEL org.opencontainers.image.source=https://gitlab.com/Guikingone/Portfolio LABEL org.opencontainers.image.revision=$REVISION ENV APP_DIR=/srv/app \ APP_ENV=prod \ APP_FRONT_CONTROLLER=index.php \ APP_LOCALE=fr \ APP_USER=portfolio-user \ APP_USER_GROUP=portfolio \ APP_PORT=8080 \ COMPOSER_DIR=/opt/composer \ COMPOSER_ALLOW_SUPERUSER=1 \ NGINX_DIR=/etc/nginx \ NGINX_VERSION=1.14.2-r1 \ PHP_FPM_CONF_DIR=/usr/local/etc/php-fpm.d/ \ SUPERVISORD_CONF_DIR=/etc/supervisor \ SUPERVISOR_VERSION=3.3.4-r1 \ BUILD_SCRIPTS_DIR=/build-scripts # Supervisord conf to be copied at the end. COPY docker/prod/php/scripts/*.sh $BUILD_SCRIPTS_DIR/ # Core dependencies installation (installed as a virtual package in order to remove it later) RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS \ &amp;&amp; apk add --no-cache --virtual .bash bash=4.4.19-r1 \ &amp;&amp; apk add --no-cache --virtual .core-php-deps icu-dev=62.1-r0 \ &amp;&amp; rm -rf /var/cache/apk/* \ &amp;&amp; docker-php-ext-install \ intl \ opcache \ &amp;&amp; docker-php-ext-configure intl \ &amp;&amp; docker-php-ext-enable opcache \ &amp;&amp; apk del .build-deps .phpize-deps-configure # User creation RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted --virtual .user-deps gosu=1.10-r0 \ &amp;&amp; rm -rf /var/cache/apk/* \ &amp;&amp; addgroup $APP_USER_GROUP \ &amp;&amp; adduser -D -h /home/portfolio -s /bin/bash -G $APP_USER_GROUP $APP_USER \ &amp;&amp; chown -R $APP_USER $BUILD_SCRIPTS_DIR \ &amp;&amp; apk del .user-deps # Nginx &amp; Supervisor installation RUN apk add --no-cache --virtual .http-deps nginx=$NGINX_VERSION supervisor=$SUPERVISOR_VERSION \ &amp;&amp; rm -rf /var/cache/apk/* \ &amp;&amp; ln -sf /dev/stdout /var/log/nginx/access.log \ &amp;&amp; ln -sf /dev/stderr /var/log/nginx/error.log RUN mkdir -p $APP_DIR $BUILD_SCRIPTS_DIR \ &amp;&amp; chown -R $APP_USER $APP_DIR \ &amp;&amp; chmod -R 755 $APP_DIR COPY docker/prod/php/conf/php.ini $PHP_INI_DIR/php.ini COPY docker/prod/php/conf/fpm.conf $PHP_FPM_CONF_DIR/fpm.conf COPY docker/prod/nginx/conf/nginx.conf $NGINX_DIR/nginx.conf COPY docker/prod/supervisord/supervisord.conf $SUPERVISORD_CONF_DIR/supervisord.conf # Used to check that PHP-FPM works HEALTHCHECK --interval=5s --timeout=3s \ CMD curl -f http://localhost/ping || exit 1 EXPOSE $APP_PORT 443 CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] # Production build FROM base as production COPY docker/prod/nginx/conf/portfolio.conf $NGINX_DIR/conf.d/portfolio.conf WORKDIR $APP_DIR COPY . . # The vendors are installed after the whole project is copied, this way, we can dump the autoload properly. # The unrequired directories are also removed. RUN /bin/bash "$BUILD_SCRIPTS_DIR/install_composer.sh" \ &amp;&amp; /bin/bash "$BUILD_SCRIPTS_DIR/composer_dependencies.sh" \ &amp;&amp; rm -rf $BUILD_SCRIPTS_DIR \ /usr/bin/git* \ /lib/apk/db/installed \ /usr/local/bin/composer \ node_modules/ </code></pre> <p>And here's the supervisor configuration file:</p> <pre><code>[supervisord] nodaemon = true logfile = /dev/null logfile_maxbytes = 0 pidfile = /var/run/supervisord.pid loglevel = INFO [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface [program:php-fpm] command = /usr/local/sbin/php-fpm autostart = true autorestart = true priority = 5 stdout_logfile = /dev/stdout stdout_logfile_maxbytes = 0 stderr_logfile = /dev/stderr stderr_logfile_maxbytes = 0 [program:nginx] command = /usr/sbin/nginx -g "daemon off;" autostart = true autorestart = true priority = 10 stdout_events_enabled = true stderr_events_enabled = true stdout_logfile = /dev/stdout stdout_logfile_maxbytes = 0 stderr_logfile = /dev/stderr stderr_logfile_maxbytes = 0 [include] files = /etc/supervisor/**/*.conf </code></pre> <p>Here's the error log in StackDriver logging linked to the container sandox:</p> <pre><code>2019-05-19 11:31:50.246 CEST Container Sandbox Limitation: Unsupported syscall prctl(0x4,0x1,0x0,0x0,0x0,0x20) </code></pre> <p>Thanks for the help.</p> </div>

如何运行composer从php容器中的dockerfile安装

<div class="post-text" itemprop="text"> <p>Good day I have php container which seting up in Dockerfile</p> <p>I am trying to run composer install with this command</p> <pre><code>WORKDIR '/app' RUN curl -sS https://getcomposer.org/installer | \ php -- --install-dir=/usr/bin/ --filename=composer CMD bash -c "composer install &amp;&amp; php artisan serve --host 0.0.0.0 --port 80" EXPOSE 80 EXPOSE 22 CMD ["php-fpm"] </code></pre> <p>But I didnt get the error, and can not run application because of the composer install didnt worked.Just white screen of laravel which mean composer was not installed.</p> <p>If I run after docker compose up</p> <pre><code>docker run -it --rm -v $(pwd):/app composer/composer install </code></pre> <p>I receive an error Composer could not find a composer.json file in /app To initialize a project, please create a composer.json file as described in the <a href="https://getcomposer.org/" rel="nofollow noreferrer">https://getcomposer.org/</a> "Getting Started" section</p> <p>If I trying to COPY project dirrectory I receive an error</p> <pre><code>COPY /var/www/docker/project /app </code></pre> <p>ERROR: Service 'php' failed to build: COPY failed: stat /var/lib/docker/tmp/docker-builder091462376/var/www/docker/project: no such file or directory While I have the volumes in php container in docker-compose.yml</p> <pre><code>volumes: - ${APP_PATH_HOST}:${APP_PATH_CONTAINER} - /app/vendor/ </code></pre> <p>Here is my docker-compose.yml</p> <pre><code>version: '2' services: nginx: image: nginx:latest container_name: "${PROJECT_NAME}_nginx" environment: NGINX_STATIC_OPEN_FILE_CACHE: "off" NGINX_ERROR_LOG_LEVEL: debug NGINX_BACKEND_HOST: php NGINX_VHOST_PRESET: php NGINX_SERVER_ROOT: /app/public ports: - "80:80" - "443:443" volumes: - ./hosts:/etc/nginx/conf.d - ${APP_PATH_HOST}:${APP_PATH_CONTAINER} - ./logs:/var/log/nginx links: - php labels: - 'traefik.backend=nginx' - 'traefik.port=80' - 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}' php: build: ./images/php links: - mariadb #command: bash -c 'cd /app composer install' volumes: - ${APP_PATH_HOST}:${APP_PATH_CONTAINER} - /app/vendor/ mariadb: image: wodby/mariadb:$MARIADB_TAG container_name: "${PROJECT_NAME}_mariadb" stop_grace_period: 30s environment: MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD MYSQL_DATABASE: $DB_NAME MYSQL_USER: $DB_USER MYSQL_PASSWORD: $DB_PASSWORD pma: image: phpmyadmin/phpmyadmin container_name: "${PROJECT_NAME}_pma" ports: - "9000:80" environment: PMA_HOST: $DB_HOST PMA_USER: $DB_USER PMA_PASSWORD: $DB_PASSWORD PHP_UPLOAD_MAX_FILESIZE: 1G PHP_MAX_INPUT_VARS: 1G labels: - 'traefik.backend=pma' - 'traefik.port=80' - 'traefik.frontend.rule=Host:pma.${PROJECT_BASE_URL}' </code></pre> <p>Here is completely Dockerfile</p> <pre><code>FROM php:7.2-fpm-alpine3.6 WORKDIR '/app' RUN apk update &amp;&amp; apk upgrade\ &amp;&amp; apk add --no-cache curl libbz2 php7-bz2 php7-pdo php7-pgsql php7-bcmath php7-zmq php7-curl bash php7-pear php7-imagick openssh imap-dev\ libtool \ postgresql-dev \ libpng-dev \ imagemagick-c++ \ imagemagick-dev \ libmcrypt-dev \ libxml2-dev \ yaml-dev \ bzip2 \ aspell-dev \ autoconf \ build-base \ linux-headers \ libaio-dev \ zlib-dev \ git \ subversion \ freetype-dev \ libjpeg-turbo-dev \ libmcrypt-dev \ bzip2-dev \ libstdc++ \ libxslt-dev \ openldap-dev \ hiredis-dev \ make \ unzip \ ffmpeg \ wget RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN docker-php-ext-configure imap --with-imap --with-imap-ssl \ &amp;&amp; docker-php-ext-install -j 4 imap RUN docker-php-ext-install gd bcmath zip bz2 pdo pdo_mysql simplexml opcache sockets mbstring pcntl xsl pspell RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ RUN pecl install imagick RUN docker-php-ext-enable imagick RUN pecl install xdebug RUN wget http://xdebug.org/files/xdebug-2.6.1.tgz RUN tar -xvzf xdebug-2.6.1.tgz RUN cd xdebug-2.6.1 \ &amp;&amp; phpize \ &amp;&amp; ./configure --enable-xdebug \ &amp;&amp; make \ &amp;&amp; make install \ &amp;&amp; cp modules/xdebug.so /usr/local/lib/php/extensions/no-debug-non-zts-20170718 \ &amp;&amp; echo 'zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so' &gt;&gt; /usr/local/etc/php/php.ini \ &amp;&amp; echo 'zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so' &gt;&gt; /etc/php7/php.ini \ &amp;&amp; echo 'xdebug.remote_enable=true' &gt;&gt; /etc/php7/php.ini \ &amp;&amp; echo 'xdebug.remote_host=127.0.0.1' &gt;&gt; /etc/php7/php.ini \ &amp;&amp; echo 'xdebug.remote_port=9000' &gt;&gt; /etc/php7/php.ini \ &amp;&amp; echo 'xdebug.remote_handler=dbgp' &gt;&gt; /etc/php7/php.ini \ &amp;&amp; echo 'xdebug.max_nesting_level=512' &gt;&gt; /etc/php7/php.ini ENV COMPOSER_ALLOW_SUPERUSER 1 RUN echo "Install ZeroMQ library and PHP extension" RUN apk add --update autoconf gcc libzmq zeromq-dev zeromq coreutils build-base RUN pecl install zmq-beta \ &amp;&amp; docker-php-ext-enable zmq #COPY ./project /app RUN curl -sS https://getcomposer.org/installer | \ php -- --install-dir=/usr/bin/ --filename=composer #RUN "composer install" EXPOSE 80 EXPOSE 22 #CMD php artisan serve --host=0.0.0.0 --port=80 #CMD php artisan migrate --seed CMD ["php-fpm"] USER root copy run.sh /run.sh RUN chmod +x /run.sh RUN ls #RUN ["chmod", "+x", "/run.sh"] COPY ./././project app/ RUN composer install --no-dev --no-interaction -o CMD ["/run.sh"] </code></pre> </div>

无法在docker-compose中使dep和dockerize一起工作(但它们是分开工作的)。 为什么?

<div class="post-text" itemprop="text"> <p>I have a curious situation where my docker-compose build won't complete when I use <code>dockerize</code> to wait for databases etc to be ready, and use <code>dep</code> to load my Go dependencies.</p> <p>Here's an extract from docker-compose.yml (there are mosquitto, postgres, and python containers in addition to the golang container shown below) </p> <pre><code>version '3.3' services: foobar_container: image: foobar_image container_name: foobar build: context: ./build_foobar dockerfile: Dockerfile.foobar #command: dockerize -wait tcp://mosquitto:1883 -wait tcp://postgres:5432 -timeout 200s /go/src/foobar/main volumes: - ./foobar:/go stdin_open: true tty: true external_links: - mosquitto - postgres ports: - 1833 - 8001 depends_on: - mosquitto - postgres </code></pre> <p>Here's my Dockerfile.foobar</p> <pre><code>FROM golang:latest WORKDIR /go RUN apt-get update &amp;&amp; apt-get install -y wget mosquitto-clients net-tools ENV DOCKERIZE_VERSION v0.6.0 RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ &amp;&amp; tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \ &amp;&amp; rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz ADD foobar.sh /foobar.sh #RUN go build main.go RUN chmod +x /foobar.sh </code></pre> <p>Here's my build script foobar.sh:</p> <pre><code>#!/bin/bash mkdir -p /go/bin # required directory that may have been overwriten by docker-compose `volumes` param echo "++++++++ Downloading Golang dependencies ... ++++++++" cd /go/src/foobar curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh echo "++++++++ Installing Golang dependencies ... ++++++++" dep ensure echo "++++++++ Testing MQTT message broker ... ++++++++" until [[ $(mosquitto_sub -h "mosquitto" -t '$SYS/#' -C 1 | cut -c 1-9) = "mosquitto" ]]; do echo "++++++++ Message broker is not ready. Waiting one second... ++++++++" sleep 1 done echo "++++++++ Building application... ++++++++" go build main.go </code></pre> <p>If I uncomment the <code>command</code> line of <code>docker-compose.yml</code> my <code>foobar.sh</code> won't run past the <code>curl</code> line. No error is outputted, the execution just stops. If I comment from <code>curl</code> onwards, and uncomment the <code>command</code> line, I can setup to completion (however the <code>foobar</code> container needs to me started manually). My python container (which depends on all postgres, go, and mosquitto containers) sets up fine.</p> <p>What's going wrong?</p> </div>

求助: Docker 运行 autoware, roscore、runtime_manager可启动但无法访问容器内文件

参考https://www.jianshu.com/p/367189d503da https://www.jianshu.com/p/daa9f634589e 两篇文章,在docker下安装了autoware 并在宿主机下载了rosbag文件,建立共享后启动镜像,在容器中通过命令行可以看到共享的文件。 运行autoware 启动脚本 可建立roscore、runtime_manager但无法访问共享的文件。是ros节点磁盘访问权限的问题吗?求助 使用下面脚本启动的镜像 ``` > #!/bin/sh > > XSOCK=/tmp/.X11-unix > XAUTH=/home/$USER/.Xauthority > SHARED_DIR=/home/autoware/shared_dir # 容器共享文件夹 > HOST_DIR=/home/$USER/autoware/shared_dir # 宿主机共享文件夹 > > nvidia-docker run \ > -it --rm \ > --volume=$XSOCK:$XSOCK:rw \ > --volume=$XAUTH:$XAUTH:rw \ > --volume=$HOST_DIR:$SHARED_DIR:rw \ > --env="XAUTHORITY=${XAUTH}" \ > --env="DISPLAY=${DISPLAY}" \ > -u autoware \ > --privileged -v /dev/bus/usb:/dev/bus/usb \ > --net=host \ > autoware/autoware:1.7.0-kinetic ``` 启动后宿主和容器的文件夹截图 ![图片说明](https://img-ask.csdn.net/upload/202004/25/1587780229_356636.jpeg) 可以看到文件夹内容相同,共享成功。 使用下面脚本启动autoware ``` > # boot ros-master > ${TERMINAL} ${MASTER_DISPLAY_OPTION} ${OPTION_WORKING_DIR}=${MY_PATH} ${OPTION_COMMAND}="bash -c 'source ./devel/setup.bash; roscore'"& > > # boot runtime_manager > ${TERMINAL} ${RUNMGR_DISPLAY_OPTION} ${OPTION_WORKING_DIR}=${MY_PATH} ${OPTION_COMMAND}="bash -c 'source ./devel/setup.bash; rosrun runtime_manager runtime_manager_dialog.py'" ``` 下图是启动后通过roscore终端访问文件的结果 ![图片说明](https://img-ask.csdn.net/upload/202004/25/1587780651_97687.png) 可以看到,没有找到文件 下图是runtime_manager图形界面访问文件的结果 ![图片说明](https://img-ask.csdn.net/upload/202004/25/1587781196_387872.png) 图中shared_dir文件夹是空的,没有文件

运行Go image时无法识别的导入路径“ main / testPackage”

<div class="post-text" itemprop="text"> <p>I am attempting to compile a golang project using docker, I am having trouble getting "go get" to compile the packages for me. the entire setup of the container can be seen below in my dockerfile:</p> <pre class="lang-sh prettyprint-override"><code>FROM buildpack-deps:jessie-scm # gcc for cgo RUN apt-get update &amp;&amp; apt-get install -y --no-install-recommends \ g++ \ gcc \ libc6-dev \ make \ pkg-config \ &amp;&amp; rm -rf /var/lib/apt/lists/* ENV GOLANG_VERSION 1.8 ENV GOLANG_DOWNLOAD_URL https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz ENV GOLANG_DOWNLOAD_SHA256 53ab94104ee3923e228a2cb2116e5e462ad3ebaeea06ff04463479d7f12d27ca RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \ &amp;&amp; echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \ &amp;&amp; tar -C /usr/local -xzf golang.tar.gz \ &amp;&amp; rm golang.tar.gz ENV GOPATH /go ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH ENV CGO_ENABLED 0 ENV GOOS linux RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" &amp;&amp; chmod -R 777 "$GOPATH" WORKDIR $GOPATH RUN go get github.com/lib/pq ENTRYPOINT ["go", "get", "."] </code></pre> <p>I build this container then use it to compile my go code using this command:</p> <pre><code>sudo docker run --rm -v /path/to/my/project:/usr/src/main -w /usr/src/main go:compiler </code></pre> <p>this finds the main.go in my project folder, reads through it.. but gives me this error when it encounters my import statements:</p> <blockquote> <p>unrecognized import path "main/testPackage" (import path does not begin with hostname)</p> </blockquote> <p>from what I have found in documentation, my understanding is the import path should be the folder in src, i.e. "main" in my case, followed by the directory structure.. what am I doing wrong? am I using go get incorrectly?</p> </div>

xdebug扩展无法安装php:5.6-apache

<div class="post-text" itemprop="text"> <p>i am trying to install xdebug into my dockerfile build but it does not install with php:5.6-apache as the base image.</p> <p>it returns the following message; </p> <pre><code>ERROR: Service 'php' failed to build: The command '/bin/sh -c apt-get update &amp;&amp; apt-get install -y ... &amp;&amp; pecl install xdebug returned a non-zero code: 1 </code></pre> <p>this is my dockerfile: </p> <pre><code>FROM php:5.6-apache ENV S6_OVERLAY_VERSION 1.11.0.1 RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / RUN apt-get update &amp;&amp; apt-get install -y \ libldap2-dev \ --no-install-recommends \ &amp;&amp; rm -r /var/lib/apt/lists/* \ &amp;&amp; docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ &amp;&amp; docker-php-ext-install ldap \ &amp;&amp; pecl install xdebug \ &amp;&amp; docker-php-ext-install mysqli pdo pdo_mysql RUN a2enmod rewrite COPY ./docker/rootfs / COPY . /app WORKDIR /app ENTRYPOINT ["/init"] </code></pre> <p>How can I install xedbug with PHP5</p> </div>

使用Docker在Jenkins上使用“供应商”目录构建Go应用

<div class="post-text" itemprop="text"> <p>I'm trying to set up a Jenkins Pipeline to build and deploy my first Go project using a <code>Jenkinsfile</code> and <code>docker.image().inside </code>. I can't figure out how to get go to pick up the dependencies in the <code>vendor/</code> directory.</p> <p>When I run the build, I get a bunch of errors:</p> <pre> + goapp test ./... src/dao/demo_dao.go:8:2: cannot find package "github.com/dgrijalva/jwt-go" in any of: /usr/lib/go_appengine/goroot/src/github.com/dgrijalva/jwt-go (from $GOROOT) /usr/lib/go_appengine/gopath/src/github.com/dgrijalva/jwt-go (from $GOPATH) /workspace/src/github.com/dgrijalva/jwt-go </pre> <p><strong>...why isn't it picking up the Vendor directory?</strong></p> <p>When I throw in some logging, it seems that after running <code>sh "cd /workspace/src/bitbucket.org/nalbion/go-demo"</code> the next <code>sh</code> command is still in the original <code>${WORKSPACE}</code> directory. I really like the idea of the Jenkins file, but I can't find any decent documentation for it.</p> <p>(Edit - there is decent documentation <a href="https://dzone.com/refcardz/continuous-delivery-with-jenkins-workflow" rel="nofollow">here</a> but <code>dir("/workspace/src/bitbucket.org/nalbion/go-demo") {}</code> doesn't seem to work within <code>docker.image().inside)</code></p> <p>My Docker file resembles:</p> <pre> FROM golang:1.6.2 # Google's App Engine Go SDK RUN wget https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.40.zip -q -O go_appengine_sdk.zip &amp;&amp; \ unzip -q go_appengine_sdk.zip -d /usr/lib/ &amp;&amp; \ rm go_appengine_sdk.zip ENV PATH /usr/lib/go_appengine:/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ENV GOPATH /usr/lib/go_appengine/gopath # Add Jenkins user RUN groupadd -g 132 jenkins &amp;&amp; useradd -d "/var/jenkins_home" -u 122 -g 132 -m -s /bin/bash jenkins </pre> <p>And my Jenkinsfile:</p> <pre> node('docker') { currentBuild.result = "SUCCESS" try { stage 'Checkout' checkout scm stage 'Build and Test' env.WORKSPACE = pwd() docker.image('nalbion/go-web-build:latest').inside( "-v ${env.WORKSPACE}:/workspace/src/bitbucket.org/nalbion/go-demo " + "-e GOPATH=/usr/lib/go_appengine/gopath:/workspace") { // Debugging sh 'echo GOPATH: $GOPATH' sh "ls -al /workspace/src/bitbucket.org/nalbion/go-demo" sh "cd /workspace/src/bitbucket.org/nalbion/go-demo" sh "pwd" sh "go vet ./src/..." sh "goapp test ./..." } stage 'Deploy to DEV' docker.image('nalbion/go-web-build').inside { sh "goapp deploy --application go-demo --version v${v} app.yaml" } timeout(time:5, unit:'DAYS') { input message:'Approve deployment?', submitter: 'qa' } stage 'Deploy to PROD' docker.image('nalbion/go-web-build').inside { sh "goapp deploy --application go-demo --version v${v} app.yaml" } } catch (err) { currentBuild.result = "FAILURE" // send notifications throw err } } </pre> </div>

在jenkins管道上使用容器运行go2xunit

<div class="post-text" itemprop="text"> <p>I am trying to running tests on Jenkinspipeline within a container. where its unable to find one of the binaries <code>/bin/sh: line 2: go2xunit: command not found</code></p> <p>Snippet of jenkins test stage :</p> <pre><code> stage('Tests') { steps { // NOTE: you must include '|| :' so a failed test does not prevent the // junit XML collection from running; any failed tests in the XML will // mark the build as UNSTABLE and indicate failed tests in GHE and jenkins sh 'make -f Makefile.release test' junit 'test/*xml' } } </code></pre> <p>Makefile.release</p> <pre><code>.PHONY: test test: @docker run -it -v test:/src/test --rm ${BUILDER_TAG} \ 2&gt;&amp;1 go test -v -short ./... | \ go2xunit -output test/test1.xml </code></pre> <p>Dockerfile</p> <pre><code>FROM golang:1.12.7-alpine AS builder #Disable cgo ENV CGO_ENABLED=0 WORKDIR /src # Packages required for project build and test RUN apk add --no-cache git make RUN go get \ github.com/AlekSi/gocov-xml \ golang.org/x/lint/golint \ github.com/axw/gocov \ github.com/tebeka/go2xunit \ github.com/wadey/gocovmerge # These layers are only re-built when Go modules are updated COPY go.mod go.sum ./ RUN go mod download # This layer is rebuilt when a file changes in the project directory COPY . ./ RUN go install ./... </code></pre> <p>Where if I give the same commands on my local machine. Or if I run those commands from within the container it works well.</p> <pre><code> C02X37E2JG5J:push3 auser03$ docker run -it d919c2f58e74 /bin/sh /src # make -f makefile.release test </code></pre> <p>What could I be missing here.</p> </div>

如果从Laravel创建,从php创建的命令不起作用

<div class="post-text" itemprop="text"> <p>I'm trying to trigger a Laravel command at a specific time, that command is created from a web interface (people can schedule an event to happen). It's not like crontab and the Laravel's Schedule commands because mine is not recurrent and just a one shot at a custom time. On my local environment (Homestead) it works. On the pre-production server (CentOS) it doesn't but only with Laravel.</p> <p>If I run a command like <code>&lt;?php echo exec("echo '/usr/local/php/bin/php artisan platform:publish-scheduled 25 &gt; plap.txt' | at now + 1minute");</code> from bash I get the result of AT printed which tells me the PID and execution time. Then at the next minute the file is created with the result of the Laravel command, works fine. But if I run <code>echo exec("echo '/usr/local/php/bin/php artisan platform:publish-scheduled 26 &gt; plap.txt' | at now + 1minute"); </code> from a Laravel controller (responding to my web interface): the command is successfully scheduled and disappears from atq on due time but nothing more happens, the Laravel command is not executed, the plap.txt is not created.</p> <p>The first method (executing PHP script from bash) gives me this: <code>at -c 99</code></p> <pre><code>#!/bin/sh # atrun uid=0 gid=0 # mail root 0 umask 22 XDG_SESSION_ID=2804837; export XDG_SESSION_ID HOSTNAME=iZwz9c70yc8miek8g0g2ilZ; export HOSTNAME SHELL=/bin/bash; export SHELL HISTSIZE=10000; export HISTSIZE SSH_CLIENT=124.78.94.138\ 51362\ 22; export SSH_CLIENT SSH_TTY=/dev/pts/0; export SSH_TTY USER=root; export USER LS_COLORS=rs=0:di=38\;5\;27:ln=38\;5\;51:mh=44\;38\;5\;15:pi=40\;38\;5\;11:so=38\;5\;13:do=38\;5\;5:bd=48\;5\;232\;38\;5\;11:cd=48\;5\;232\;38\;5\;3:or=48\;5\;232\;38\;5\;9:mi=05\;48\;5\;232\;38\;5\;15:su=48\;5\;196\;38\;5\;15:sg=48\;5\;11\;38\;5\;16:ca=48\;5\;196\;38\;5\;226:tw=48\;5\;10\;38\;5\;16:ow=48\;5\;10\;38\;5\;21:st=48\;5\;21\;38\;5\;15:ex=38\;5\;34:\*.tar=38\;5\;9:\*.tgz=38\;5\;9:\*.arc=38\;5\;9:\*.arj=38\;5\;9:\*.taz=38\;5\;9:\*.lha=38\;5\;9:\*.lz4=38\;5\;9:\*.lzh=38\;5\;9:\*.lzma=38\;5\;9:\*.tlz=38\;5\;9:\*.txz=38\;5\;9:\*.tzo=38\;5\;9:\*.t7z=38\;5\;9:\*.zip=38\;5\;9:\*.z=38\;5\;9:\*.Z=38\;5\;9:\*.dz=38\;5\;9:\*.gz=38\;5\;9:\*.lrz=38\;5\;9:\*.lz=38\;5\;9:\*.lzo=38\;5\;9:\*.xz=38\;5\;9:\*.bz2=38\;5\;9:\*.bz=38\;5\;9:\*.tbz=38\;5\;9:\*.tbz2=38\;5\;9:\*.tz=38\;5\;9:\*.deb=38\;5\;9:\*.rpm=38\;5\;9:\*.jar=38\;5\;9:\*.war=38\;5\;9:\*.ear=38\;5\;9:\*.sar=38\;5\;9:\*.rar=38\;5\;9:\*.alz=38\;5\;9:\*.ace=38\;5\;9:\*.zoo=38\;5\;9:\*.cpio=38\;5\;9:\*.7z=38\;5\;9:\*.rz=38\;5\;9:\*.cab=38\;5\;9:\*.jpg=38\;5\;13:\*.jpeg=38\;5\;13:\*.gif=38\;5\;13:\*.bmp=38\;5\;13:\*.pbm=38\;5\;13:\*.pgm=38\;5\;13:\*.ppm=38\;5\;13:\*.tga=38\;5\;13:\*.xbm=38\;5\;13:\*.xpm=38\;5\;13:\*.tif=38\;5\;13:\*.tiff=38\;5\;13:\*.png=38\;5\;13:\*.svg=38\;5\;13:\*.svgz=38\;5\;13:\*.mng=38\;5\;13:\*.pcx=38\;5\;13:\*.mov=38\;5\;13:\*.mpg=38\;5\;13:\*.mpeg=38\;5\;13:\*.m2v=38\;5\;13:\*.mkv=38\;5\;13:\*.webm=38\;5\;13:\*.ogm=38\;5\;13:\*.mp4=38\;5\;13:\*.m4v=38\;5\;13:\*.mp4v=38\;5\;13:\*.vob=38\;5\;13:\*.qt=38\;5\;13:\*.nuv=38\;5\;13:\*.wmv=38\;5\;13:\*.asf=38\;5\;13:\*.rm=38\;5\;13:\*.rmvb=38\;5\;13:\*.flc=38\;5\;13:\*.avi=38\;5\;13:\*.fli=38\;5\;13:\*.flv=38\;5\;13:\*.gl=38\;5\;13:\*.dl=38\;5\;13:\*.xcf=38\;5\;13:\*.xwd=38\;5\;13:\*.yuv=38\;5\;13:\*.cgm=38\;5\;13:\*.emf=38\;5\;13:\*.axv=38\;5\;13:\*.anx=38\;5\;13:\*.ogv=38\;5\;13:\*.ogx=38\;5\;13:\*.aac=38\;5\;45:\*.au=38\;5\;45:\*.flac=38\;5\;45:\*.mid=38\;5\;45:\*.midi=38\;5\;45:\*.mka=38\;5\;45:\*.mp3=38\;5\;45:\*.mpc=38\;5\;45:\*.ogg=38\;5\;45:\*.ra=38\;5\;45:\*.wav=38\;5\;45:\*.axa=38\;5\;45:\*.oga=38\;5\;45:\*.spx=38\;5\;45:\*.xspf=38\;5\;45:; export LS_COLORS PATH=/root/.yarn/bin:/usr/local/nginx/sbin:/usr/local/php/bin:/usr/local/mysql/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin; export PATH MAIL=/var/spool/mail/root; export MAIL PWD=/data/wwwroot/mydomain.cn; export PWD LANG=en_US.UTF-8; export LANG HISTCONTROL=ignoredups; export HISTCONTROL HOME=/root; export HOME SHLVL=2; export SHLVL LOGNAME=root; export LOGNAME LC_CTYPE=UTF-8; export LC_CTYPE SSH_CONNECTION=124.78.94.138\ 51362\ 120.76.29.164\ 22; export SSH_CONNECTION LESSOPEN=\|\|/usr/bin/lesspipe.sh\ %s; export LESSOPEN XDG_RUNTIME_DIR=/run/user/0; export XDG_RUNTIME_DIR cd /data/wwwroot/platform\-dev\.phoceis\.cn || { echo 'Execution directory inaccessible' &gt;&amp;2 exit 1 } ${SHELL:-/bin/sh} &lt;&lt; 'marcinDELIMITER6748b86c' php artisan platform:publish-scheduled 25 &gt; plap.txt marcinDELIMITER6748b86c </code></pre> <p>The one from Laravel gives me this: <code>at -c 100</code></p> <pre><code>#!/bin/sh # atrun uid=1001 gid=1001 # mail root 0 umask 22 USER=www; export USER TEMP=/tmp; export TEMP PATH=/usr/local/bin:/usr/bin:/bin; export PATH PWD=/data/wwwroot/mydomain.cn/public; export PWD SHLVL=1; export SHLVL HOME=/home/www; export HOME TMP=/tmp; export TMP cd /data/wwwroot/platform\-dev\.phoceis\.cn/public || { echo 'Execution directory inaccessible' &gt;&amp;2 exit 1 } ${SHELL:-/bin/sh} &lt;&lt; 'marcinDELIMITER5976c072' /usr/local/php/bin/php artisan platform:publish-scheduled 26 &gt; plap.txt marcinDELIMITER5976c072 </code></pre> <p>not the same user, but www owns the folder.</p> <p>The problem is that I don't even know where any error message would go in that situation, couldn't find any error log related to that.</p> <p>I specify the full path to the PHP binary (which was the first flaw in my script) so there is no problem about PHP path.</p> <p>I don't know what to try anymore. Please help!</p> </div>

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

Linux 会成为主流桌面操作系统吗?

整理 |屠敏出品 | CSDN(ID:CSDNnews)2020 年 1 月 14 日,微软正式停止了 Windows 7 系统的扩展支持,这意味着服役十年的 Windows 7,属于...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

学习总结之HTML5剑指前端(建议收藏,图文并茂)

前言学习《HTML5与CSS3权威指南》这本书很不错,学完之后我颇有感触,觉得web的世界开明了许多。这本书是需要有一定基础的web前端开发工程师。这本书主要学习HTML5和css3,看...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

搜狗输入法也在挑战国人的智商!

故事总是一个接着一个到来...上周写完《鲁大师已经彻底沦为一款垃圾流氓软件!》这篇文章之后,鲁大师的市场工作人员就找到了我,希望把这篇文章删除掉。经过一番沟通我先把这篇文章从公号中删除了...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

记一次腾讯面试,我挂在了最熟悉不过的队列上……

腾讯后台面试,面试官问:如何自己实现队列?

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

冒泡排序动画(基于python pygame实现)

本项目效果初始截图如下 动画见本人b站投稿:https://www.bilibili.com/video/av95491382 本项目对应github地址:https://github.com/BigShuang python版本:3.6,pygame版本:1.9.3。(python版本一致应该就没什么问题) 样例gif如下 ======================= 大爽歌作,mad

Redis核心原理与应用实践

Redis核心原理与应用实践 在很多场景下都会使用Redis,但是到了深层次的时候就了解的不是那么深刻,以至于在面试的时候经常会遇到卡壳的现象,学习知识要做到系统和深入,不要把Redis想象的过于复杂,和Mysql一样,是个读取数据的软件。 有一个理解是Redis是key value缓存服务器,更多的优点在于对value的操作更加丰富。 安装 yum install redis #yum安装 b...

现代的 “Hello, World”,可不仅仅是几行代码而已

作者 |Charles R. Martin译者 | 弯月,责编 | 夕颜头图 |付费下载自视觉中国出品 | CSDN(ID:CSDNnews)新手...

带了6个月的徒弟当了面试官,而身为高级工程师的我天天修Bug......

即将毕业的应届毕业生一枚,现在只拿到了两家offer,但最近听到一些消息,其中一个offer,我这个组据说客户很少,很有可能整组被裁掉。 想问大家: 如果我刚入职这个组就被裁了怎么办呢? 大家都是什么时候知道自己要被裁了的? 面试软技能指导: BQ/Project/Resume 试听内容: 除了刷题,还有哪些技能是拿到offer不可或缺的要素 如何提升面试软实力:简历, 行为面试,沟通能...

!大部分程序员只会写3年代码

如果世界上都是这种不思进取的软件公司,那别说大部分程序员只会写 3 年代码,恐怕就没有程序员这种职业。

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

2020阿里全球数学大赛:3万名高手、4道题、2天2夜未交卷

阿里巴巴全球数学竞赛( Alibaba Global Mathematics Competition)由马云发起,由中国科学技术协会、阿里巴巴基金会、阿里巴巴达摩院共同举办。大赛不设报名门槛,全世界爱好数学的人都可参与,不论是否出身数学专业、是否投身数学研究。 2020年阿里巴巴达摩院邀请北京大学、剑桥大学、浙江大学等高校的顶尖数学教师组建了出题组。中科院院士、美国艺术与科学院院士、北京国际数学...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

HTTP与HTTPS的区别

面试官问HTTP与HTTPS的区别,我这样回答让他竖起大拇指!

程序员毕业去大公司好还是小公司好?

虽然大公司并不是人人都能进,但我仍建议还未毕业的同学,尽力地通过校招向大公司挤,但凡挤进去,你这一生会容易很多。 大公司哪里好?没能进大公司怎么办?答案都在这里了,记得帮我点赞哦。 目录: 技术氛围 内部晋升与跳槽 啥也没学会,公司倒闭了? 不同的人脉圈,注定会有不同的结果 没能去大厂怎么办? 一、技术氛围 纵观整个程序员技术领域,哪个在行业有所名气的大牛,不是在大厂? 而且众所...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

立即提问
相关内容推荐