Popular New Releases in Docker
kubernetes
Kubernetes v1.24.0-rc.0
TypeScript
TypeScript 4.7 Beta
moby
v20.10.12
elasticsearch
Elasticsearch 8.1.3
netdata
v1.34.1
Popular Libraries in Docker
by kubernetes go
87661 Apache-2.0
Production-Grade Container Scheduling and Management
by awesome-selfhosted javascript
84418 NOASSERTION
A list of Free Software network services and web applications which can be hosted on your own servers
by microsoft typescript
79882 Apache-2.0
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
by moby go
62382 Apache-2.0
Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
by elastic java
59266 NOASSERTION
Free and Open, Distributed, RESTful Search Engine
by netdata c
58912 GPL-3.0
Real-time performance monitoring, done right! https://www.netdata.cloud
by ripienaar html
53713
A list of SaaS, PaaS and IaaS offerings that have free tiers of interest to devops and infradev
by ansible python
52834 GPL-3.0
Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.
by macrozheng java
52180 Apache-2.0
mall项目是一套电商系统,包括前台商城系统及后台管理系统,基于SpringBoot+MyBatis实现,采用Docker容器化部署。 前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、设置等模块。
Trending New libraries in Docker
by sickcodes shell
21476 GPL-3.0
Run Mac in a Docker! Run near native OSX-KVM in Docker! X11 Forwarding! CI/CD for OS X!
by mingrammer python
16552 MIT
:art: Diagram as Code for prototyping cloud system architectures
by backstage typescript
16116 Apache-2.0
Backstage is an open platform for building developer portals
by louislam javascript
16089 MIT
A fancy self-hosted monitoring tool
by docker html
14536 CC0-1.0
Awesome Docker Compose samples
by jina-ai python
14316 Apache-2.0
Cloud-native neural search framework for 𝙖𝙣𝙮 kind of data
by rustdesk rust
11657 GPL-3.0
Yet another remote desktop software
by lima-vm go
7768 Apache-2.0
Linux virtual machines, typically on macOS, for running containerd
by OpenIMSDK go
7570 Apache-2.0
OpenIM: Instant messaging open source project based on go built by IM technology experts. Backend in Go.(由IM技术专家打造的基于 Go 实现的即时通讯(IM)项目,从服务端到客户端SDK开源即时通讯(IM)整体解决方案,可以轻松替代第三方IM云服务,打造具备聊天、社交功能的app。)
Top Authors in Docker
1
203 Libraries
5003
2
177 Libraries
9605
3
134 Libraries
3113
4
124 Libraries
105783
5
112 Libraries
39359
6
104 Libraries
10312
7
101 Libraries
6297
8
90 Libraries
16111
9
85 Libraries
13703
10
81 Libraries
40469
1
203 Libraries
5003
2
177 Libraries
9605
3
134 Libraries
3113
4
124 Libraries
105783
5
112 Libraries
39359
6
104 Libraries
10312
7
101 Libraries
6297
8
90 Libraries
16111
9
85 Libraries
13703
10
81 Libraries
40469
Trending Kits in Docker
No Trending Kits are available at this moment for Docker
Trending Discussions on Docker
Python/Docker ImportError: cannot import name 'json' from itsdangerous
Docker push to AWS ECR hangs immediately and times out
EmbeddedKafka failing since Spring Boot 2.6.X : AccessDeniedException: ..\AppData\Local\Temp\spring.kafka*
dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory
Github Actions Failing
WARNING: Running pip as the 'root' user
pip-compile raising AssertionError on its logging handler
Docker standard_init_linux.go:228: exec user process caused: no such file or directory
Create a Linux-based Docker file for .NET Framework project
Does docker-compose support init container?
QUESTION
Python/Docker ImportError: cannot import name 'json' from itsdangerous
Asked 2022-Mar-31 at 12:49I am trying to get a Flask and Docker application to work but when I try and run it using my docker-compose up
command in my Visual Studio terminal, it gives me an ImportError called ImportError: cannot import name 'json' from itsdangerous
. I have tried to look for possible solutions to this problem but as of right now there are not many on here or anywhere else. The only two solutions I could find are to change the current installation of MarkupSafe and itsdangerous to a higher version: https://serverfault.com/questions/1094062/from-itsdangerous-import-json-as-json-importerror-cannot-import-name-json-fr and another one on GitHub that tells me to essentially change the MarkUpSafe and itsdangerous installation again https://github.com/aws/aws-sam-cli/issues/3661, I have also tried to make a virtual environment named veganetworkscriptenv
to install the packages but that has also failed as well. I am currently using Flask 2.0.0 and Docker 5.0.0 and the error occurs on line eight in vegamain.py.
Here is the full ImportError that I get when I try and run the program:
1veganetworkscript-backend-1 | Traceback (most recent call last):
2veganetworkscript-backend-1 | File "/app/vegamain.py", line 8, in <module>
3veganetworkscript-backend-1 | from flask import Flask
4veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 19, in <module>
5veganetworkscript-backend-1 | from . import json
6veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/json/__init__.py", line 15, in <module>
7veganetworkscript-backend-1 | from itsdangerous import json as _json
8veganetworkscript-backend-1 | ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/site-packages/itsdangerous/__init__.py)
9veganetworkscript-backend-1 exited with code 1
10
Here are my requirements.txt, vegamain.py, Dockerfile, and docker-compose.yml files:
requirements.txt:
1veganetworkscript-backend-1 | Traceback (most recent call last):
2veganetworkscript-backend-1 | File "/app/vegamain.py", line 8, in <module>
3veganetworkscript-backend-1 | from flask import Flask
4veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 19, in <module>
5veganetworkscript-backend-1 | from . import json
6veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/json/__init__.py", line 15, in <module>
7veganetworkscript-backend-1 | from itsdangerous import json as _json
8veganetworkscript-backend-1 | ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/site-packages/itsdangerous/__init__.py)
9veganetworkscript-backend-1 exited with code 1
10Flask==2.0.0
11Flask-SQLAlchemy==2.4.4
12SQLAlchemy==1.3.20
13Flask-Migrate==2.5.3
14Flask-Script==2.0.6
15Flask-Cors==3.0.9
16requests==2.25.0
17mysqlclient==2.0.1
18pika==1.1.0
19wolframalpha==4.3.0
20
vegamain.py:
1veganetworkscript-backend-1 | Traceback (most recent call last):
2veganetworkscript-backend-1 | File "/app/vegamain.py", line 8, in <module>
3veganetworkscript-backend-1 | from flask import Flask
4veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 19, in <module>
5veganetworkscript-backend-1 | from . import json
6veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/json/__init__.py", line 15, in <module>
7veganetworkscript-backend-1 | from itsdangerous import json as _json
8veganetworkscript-backend-1 | ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/site-packages/itsdangerous/__init__.py)
9veganetworkscript-backend-1 exited with code 1
10Flask==2.0.0
11Flask-SQLAlchemy==2.4.4
12SQLAlchemy==1.3.20
13Flask-Migrate==2.5.3
14Flask-Script==2.0.6
15Flask-Cors==3.0.9
16requests==2.25.0
17mysqlclient==2.0.1
18pika==1.1.0
19wolframalpha==4.3.0
20# Veganetwork (C) TetraSystemSolutions 2022
21# all rights are reserved.
22#
23# Author: Trevor R. Blanchard Feb-19-2022-Jul-30-2022
24#
25
26# get our imports in order first
27from flask import Flask # <-- error occurs here!!!
28
29# start the application through flask.
30app = Flask(__name__)
31
32# if set to true will return only a "Hello World" string.
33Debug = True
34
35# start a route to the index part of the app in flask.
36@app.route('/')
37def index():
38 if (Debug == True):
39 return 'Hello World!'
40 else:
41 pass
42
43# start the flask app here --->
44if __name__ == '__main__':
45 app.run(debug=True, host='0.0.0.0')
46
Dockerfile:
1veganetworkscript-backend-1 | Traceback (most recent call last):
2veganetworkscript-backend-1 | File "/app/vegamain.py", line 8, in <module>
3veganetworkscript-backend-1 | from flask import Flask
4veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 19, in <module>
5veganetworkscript-backend-1 | from . import json
6veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/json/__init__.py", line 15, in <module>
7veganetworkscript-backend-1 | from itsdangerous import json as _json
8veganetworkscript-backend-1 | ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/site-packages/itsdangerous/__init__.py)
9veganetworkscript-backend-1 exited with code 1
10Flask==2.0.0
11Flask-SQLAlchemy==2.4.4
12SQLAlchemy==1.3.20
13Flask-Migrate==2.5.3
14Flask-Script==2.0.6
15Flask-Cors==3.0.9
16requests==2.25.0
17mysqlclient==2.0.1
18pika==1.1.0
19wolframalpha==4.3.0
20# Veganetwork (C) TetraSystemSolutions 2022
21# all rights are reserved.
22#
23# Author: Trevor R. Blanchard Feb-19-2022-Jul-30-2022
24#
25
26# get our imports in order first
27from flask import Flask # <-- error occurs here!!!
28
29# start the application through flask.
30app = Flask(__name__)
31
32# if set to true will return only a "Hello World" string.
33Debug = True
34
35# start a route to the index part of the app in flask.
36@app.route('/')
37def index():
38 if (Debug == True):
39 return 'Hello World!'
40 else:
41 pass
42
43# start the flask app here --->
44if __name__ == '__main__':
45 app.run(debug=True, host='0.0.0.0')
46FROM python:3.9
47ENV PYTHONUNBUFFERED 1
48WORKDIR /app
49COPY requirements.txt /app/requirements.txt
50RUN pip install -r requirements.txt
51COPY . /app
52
docker-compose.yml:
1veganetworkscript-backend-1 | Traceback (most recent call last):
2veganetworkscript-backend-1 | File "/app/vegamain.py", line 8, in <module>
3veganetworkscript-backend-1 | from flask import Flask
4veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/__init__.py", line 19, in <module>
5veganetworkscript-backend-1 | from . import json
6veganetworkscript-backend-1 | File "/usr/local/lib/python3.9/site-packages/flask/json/__init__.py", line 15, in <module>
7veganetworkscript-backend-1 | from itsdangerous import json as _json
8veganetworkscript-backend-1 | ImportError: cannot import name 'json' from 'itsdangerous' (/usr/local/lib/python3.9/site-packages/itsdangerous/__init__.py)
9veganetworkscript-backend-1 exited with code 1
10Flask==2.0.0
11Flask-SQLAlchemy==2.4.4
12SQLAlchemy==1.3.20
13Flask-Migrate==2.5.3
14Flask-Script==2.0.6
15Flask-Cors==3.0.9
16requests==2.25.0
17mysqlclient==2.0.1
18pika==1.1.0
19wolframalpha==4.3.0
20# Veganetwork (C) TetraSystemSolutions 2022
21# all rights are reserved.
22#
23# Author: Trevor R. Blanchard Feb-19-2022-Jul-30-2022
24#
25
26# get our imports in order first
27from flask import Flask # <-- error occurs here!!!
28
29# start the application through flask.
30app = Flask(__name__)
31
32# if set to true will return only a "Hello World" string.
33Debug = True
34
35# start a route to the index part of the app in flask.
36@app.route('/')
37def index():
38 if (Debug == True):
39 return 'Hello World!'
40 else:
41 pass
42
43# start the flask app here --->
44if __name__ == '__main__':
45 app.run(debug=True, host='0.0.0.0')
46FROM python:3.9
47ENV PYTHONUNBUFFERED 1
48WORKDIR /app
49COPY requirements.txt /app/requirements.txt
50RUN pip install -r requirements.txt
51COPY . /app
52version: '3.8'
53services:
54 backend:
55 build:
56 context: .
57 dockerfile: Dockerfile
58 command: 'python vegamain.py'
59 ports:
60 - 8004:5000
61 volumes:
62 - .:/app
63 depends_on:
64 - db
65
66# queue:
67# build:
68# context: .
69# dockerfile: Dockerfile
70# command: 'python -u consumer.py'
71# depends_on:
72# - db
73
74 db:
75 image: mysql:5.7.22
76 restart: always
77 environment:
78 MYSQL_DATABASE: admin
79 MYSQL_USER: root
80 MYSQL_PASSWORD: root
81 MYSQL_ROOT_PASSWORD: root
82 volumes:
83 - .dbdata:/var/lib/mysql
84 ports:
85 - 33069:3306
86
How exactly can I fix this code? thank you!
ANSWER
Answered 2022-Feb-20 at 12:31I was facing the same issue while running docker containers with flask.
I downgraded Flask
to 1.1.4
and markupsafe
to 2.0.1
which solved my issue.
Check this for reference.
QUESTION
Docker push to AWS ECR hangs immediately and times out
Asked 2022-Mar-30 at 07:53I'm trying to push my first docker image to ECR. I've followed the steps provided by AWS and things seem to be going smoothly until the final push which immediately times out. Specifically, I pass my aws ecr credentials to docker and get a "login succeeded" message. I then tag the image which also works. pushing to the ecr repo I get no error message, just the following:
1The push refers to repository [xxxxxxxxxxx.dkr.ecr.ca-central-1.amazonaws.com/reponame]
2714c1b96dd83: Retrying in 1 second
3d2cdc77dd068: Retrying in 1 second
430aad807caf5: Retrying in 1 second
50559774c4ea2: Retrying in 1 second
6285b8616682f: Retrying in 1 second
74aeea0ec2b15: Waiting
81b1312f842d8: Waiting
9c310009e0ef3: Waiting
10a48777e566d3: Waiting
112a0c9f28029a: Waiting
12EOF
13
It tries a bunch of times and then exits with no message. Any idea what's wrong?
ANSWER
Answered 2022-Jan-02 at 14:23I figured out my issue. I wasn't using the correct credentials. I had a personal AWS account as my default credentials and needed to add my work profile to my credentials.
EDIT
If you have multiple aws profiles, you can mention the profile name at the docker login as below (assuming you have done aws configure --profile someprofile
at earlier day),
1The push refers to repository [xxxxxxxxxxx.dkr.ecr.ca-central-1.amazonaws.com/reponame]
2714c1b96dd83: Retrying in 1 second
3d2cdc77dd068: Retrying in 1 second
430aad807caf5: Retrying in 1 second
50559774c4ea2: Retrying in 1 second
6285b8616682f: Retrying in 1 second
74aeea0ec2b15: Waiting
81b1312f842d8: Waiting
9c310009e0ef3: Waiting
10a48777e566d3: Waiting
112a0c9f28029a: Waiting
12EOF
13aws ecr get-login-password --region us-east-1 --profile someprofile | docker login ....
14
QUESTION
EmbeddedKafka failing since Spring Boot 2.6.X : AccessDeniedException: ..\AppData\Local\Temp\spring.kafka*
Asked 2022-Mar-25 at 12:39e: this has been fixed through Spring Boot 2.6.5 (see https://github.com/spring-projects/spring-boot/issues/30243)
Since upgrading to Spring Boot 2.6.X (in my case: 2.6.1), I have multiple projects that now have failing unit-tests on Windows that cannot start EmbeddedKafka
, that do run with Linux
There is multiple errors, but this is the first one thrown
1...
2 . ____ _ __ _ _
3 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
4( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
5 \\/ ___)| |_)| | | | | || (_| | ) ) ) )
6 ' |____| .__|_| |_|_| |_\__, | / / / /
7 =========|_|==============|___/=/_/_/_/
8 :: Spring Boot :: (v2.6.1)
9
102021-12-09 16:15:00.300 INFO 13864 --- [ main] k.utils.Log4jControllerRegistration$ : Registered kafka:type=kafka.Log4jController MBean
112021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer :
122021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : ______ _
132021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : |___ / | |
142021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : / / ___ ___ | | __ ___ ___ _ __ ___ _ __
152021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : / / / _ \ / _ \ | |/ / / _ \ / _ \ | '_ \ / _ \ | '__|
162021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : / /__ | (_) | | (_) | | < | __/ | __/ | |_) | | __/ | |
172021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : /_____| \___/ \___/ |_|\_\ \___| \___| | .__/ \___| |_|
182021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : | |
192021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : |_|
202021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer :
212021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT
222021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:host.name=host.docker.internal
232021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:java.version=11.0.11
242021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:java.vendor=AdoptOpenJDK
25...
262021-12-09 16:15:01.015 INFO 13864 --- [nelReaper-Fetch] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Fetch]: Starting
272021-12-09 16:15:01.015 INFO 13864 --- [lReaper-Produce] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Produce]: Starting
282021-12-09 16:15:01.016 INFO 13864 --- [lReaper-Request] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Request]: Starting
292021-12-09 16:15:01.017 INFO 13864 --- [trollerMutation] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-ControllerMutation]: Starting
302021-12-09 16:15:01.037 INFO 13864 --- [ main] kafka.log.LogManager : Loading logs from log dirs ArraySeq(C:\Users\ddrop\AppData\Local\Temp\spring.kafka.bf8e2b62-a1f2-4092-b292-a15e35bd31ad18378079390566696446)
312021-12-09 16:15:01.040 INFO 13864 --- [ main] kafka.log.LogManager : Attempting recovery for all logs in C:\Users\ddrop\AppData\Local\Temp\spring.kafka.bf8e2b62-a1f2-4092-b292-a15e35bd31ad18378079390566696446 since no clean shutdown file was found
322021-12-09 16:15:01.043 INFO 13864 --- [ main] kafka.log.LogManager : Loaded 0 logs in 6ms.
332021-12-09 16:15:01.043 INFO 13864 --- [ main] kafka.log.LogManager : Starting log cleanup with a period of 300000 ms.
342021-12-09 16:15:01.045 INFO 13864 --- [ main] kafka.log.LogManager : Starting log flusher with a default period of 9223372036854775807 ms.
352021-12-09 16:15:01.052 INFO 13864 --- [ main] kafka.log.LogCleaner : Starting the log cleaner
362021-12-09 16:15:01.059 INFO 13864 --- [leaner-thread-0] kafka.log.LogCleaner : [kafka-log-cleaner-thread-0]: Starting
372021-12-09 16:15:01.224 INFO 13864 --- [name=forwarding] k.s.BrokerToControllerRequestThread : [BrokerToControllerChannelManager broker=0 name=forwarding]: Starting
382021-12-09 16:15:01.325 INFO 13864 --- [ main] kafka.network.ConnectionQuotas : Updated connection-accept-rate max connection creation rate to 2147483647
392021-12-09 16:15:01.327 INFO 13864 --- [ main] kafka.network.Acceptor : Awaiting socket connections on localhost:63919.
402021-12-09 16:15:01.345 INFO 13864 --- [ main] kafka.network.SocketServer : [SocketServer listenerType=ZK_BROKER, nodeId=0] Created data-plane acceptor and processors for endpoint : ListenerName(PLAINTEXT)
412021-12-09 16:15:01.350 INFO 13864 --- [0 name=alterIsr] k.s.BrokerToControllerRequestThread : [BrokerToControllerChannelManager broker=0 name=alterIsr]: Starting
422021-12-09 16:15:01.364 INFO 13864 --- [eaper-0-Produce] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Produce]: Starting
432021-12-09 16:15:01.364 INFO 13864 --- [nReaper-0-Fetch] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Fetch]: Starting
442021-12-09 16:15:01.365 INFO 13864 --- [0-DeleteRecords] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-DeleteRecords]: Starting
452021-12-09 16:15:01.365 INFO 13864 --- [r-0-ElectLeader] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-ElectLeader]: Starting
462021-12-09 16:15:01.374 INFO 13864 --- [rFailureHandler] k.s.ReplicaManager$LogDirFailureHandler : [LogDirFailureHandler]: Starting
472021-12-09 16:15:01.390 INFO 13864 --- [ main] kafka.zk.KafkaZkClient : Creating /brokers/ids/0 (is it secure? false)
482021-12-09 16:15:01.400 INFO 13864 --- [ main] kafka.zk.KafkaZkClient : Stat of the created znode at /brokers/ids/0 is: 25,25,1639062901396,1639062901396,1,0,0,72059919267528704,204,0,25
49
502021-12-09 16:15:01.400 INFO 13864 --- [ main] kafka.zk.KafkaZkClient : Registered broker 0 at path /brokers/ids/0 with addresses: PLAINTEXT://localhost:63919, czxid (broker epoch): 25
512021-12-09 16:15:01.410 ERROR 13864 --- [ main] kafka.server.BrokerMetadataCheckpoint : Failed to write meta.properties due to
52
53java.nio.file.AccessDeniedException: C:\Users\ddrop\AppData\Local\Temp\spring.kafka.bf8e2b62-a1f2-4092-b292-a15e35bd31ad18378079390566696446
54 at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89) ~[na:na]
55 at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[na:na]
56 at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[na:na]
57
Reproduceable via spring Initializr + adding "Spring Kafka": https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.6.1&packaging=jar&jvmVersion=11&groupId=com.example&artifactId=demo&name=demo&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.demo&dependencies=kafka
And then have following test-class to execute:
1...
2 . ____ _ __ _ _
3 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
4( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
5 \\/ ___)| |_)| | | | | || (_| | ) ) ) )
6 ' |____| .__|_| |_|_| |_\__, | / / / /
7 =========|_|==============|___/=/_/_/_/
8 :: Spring Boot :: (v2.6.1)
9
102021-12-09 16:15:00.300 INFO 13864 --- [ main] k.utils.Log4jControllerRegistration$ : Registered kafka:type=kafka.Log4jController MBean
112021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer :
122021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : ______ _
132021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : |___ / | |
142021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : / / ___ ___ | | __ ___ ___ _ __ ___ _ __
152021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : / / / _ \ / _ \ | |/ / / _ \ / _ \ | '_ \ / _ \ | '__|
162021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : / /__ | (_) | | (_) | | < | __/ | __/ | |_) | | __/ | |
172021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : /_____| \___/ \___/ |_|\_\ \___| \___| | .__/ \___| |_|
182021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : | |
192021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : |_|
202021-12-09 16:15:00.420 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer :
212021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT
222021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:host.name=host.docker.internal
232021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:java.version=11.0.11
242021-12-09 16:15:00.422 INFO 13864 --- [ main] o.a.zookeeper.server.ZooKeeperServer : Server environment:java.vendor=AdoptOpenJDK
25...
262021-12-09 16:15:01.015 INFO 13864 --- [nelReaper-Fetch] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Fetch]: Starting
272021-12-09 16:15:01.015 INFO 13864 --- [lReaper-Produce] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Produce]: Starting
282021-12-09 16:15:01.016 INFO 13864 --- [lReaper-Request] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-Request]: Starting
292021-12-09 16:15:01.017 INFO 13864 --- [trollerMutation] lientQuotaManager$ThrottledChannelReaper : [ThrottledChannelReaper-ControllerMutation]: Starting
302021-12-09 16:15:01.037 INFO 13864 --- [ main] kafka.log.LogManager : Loading logs from log dirs ArraySeq(C:\Users\ddrop\AppData\Local\Temp\spring.kafka.bf8e2b62-a1f2-4092-b292-a15e35bd31ad18378079390566696446)
312021-12-09 16:15:01.040 INFO 13864 --- [ main] kafka.log.LogManager : Attempting recovery for all logs in C:\Users\ddrop\AppData\Local\Temp\spring.kafka.bf8e2b62-a1f2-4092-b292-a15e35bd31ad18378079390566696446 since no clean shutdown file was found
322021-12-09 16:15:01.043 INFO 13864 --- [ main] kafka.log.LogManager : Loaded 0 logs in 6ms.
332021-12-09 16:15:01.043 INFO 13864 --- [ main] kafka.log.LogManager : Starting log cleanup with a period of 300000 ms.
342021-12-09 16:15:01.045 INFO 13864 --- [ main] kafka.log.LogManager : Starting log flusher with a default period of 9223372036854775807 ms.
352021-12-09 16:15:01.052 INFO 13864 --- [ main] kafka.log.LogCleaner : Starting the log cleaner
362021-12-09 16:15:01.059 INFO 13864 --- [leaner-thread-0] kafka.log.LogCleaner : [kafka-log-cleaner-thread-0]: Starting
372021-12-09 16:15:01.224 INFO 13864 --- [name=forwarding] k.s.BrokerToControllerRequestThread : [BrokerToControllerChannelManager broker=0 name=forwarding]: Starting
382021-12-09 16:15:01.325 INFO 13864 --- [ main] kafka.network.ConnectionQuotas : Updated connection-accept-rate max connection creation rate to 2147483647
392021-12-09 16:15:01.327 INFO 13864 --- [ main] kafka.network.Acceptor : Awaiting socket connections on localhost:63919.
402021-12-09 16:15:01.345 INFO 13864 --- [ main] kafka.network.SocketServer : [SocketServer listenerType=ZK_BROKER, nodeId=0] Created data-plane acceptor and processors for endpoint : ListenerName(PLAINTEXT)
412021-12-09 16:15:01.350 INFO 13864 --- [0 name=alterIsr] k.s.BrokerToControllerRequestThread : [BrokerToControllerChannelManager broker=0 name=alterIsr]: Starting
422021-12-09 16:15:01.364 INFO 13864 --- [eaper-0-Produce] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Produce]: Starting
432021-12-09 16:15:01.364 INFO 13864 --- [nReaper-0-Fetch] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-Fetch]: Starting
442021-12-09 16:15:01.365 INFO 13864 --- [0-DeleteRecords] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-DeleteRecords]: Starting
452021-12-09 16:15:01.365 INFO 13864 --- [r-0-ElectLeader] perationPurgatory$ExpiredOperationReaper : [ExpirationReaper-0-ElectLeader]: Starting
462021-12-09 16:15:01.374 INFO 13864 --- [rFailureHandler] k.s.ReplicaManager$LogDirFailureHandler : [LogDirFailureHandler]: Starting
472021-12-09 16:15:01.390 INFO 13864 --- [ main] kafka.zk.KafkaZkClient : Creating /brokers/ids/0 (is it secure? false)
482021-12-09 16:15:01.400 INFO 13864 --- [ main] kafka.zk.KafkaZkClient : Stat of the created znode at /brokers/ids/0 is: 25,25,1639062901396,1639062901396,1,0,0,72059919267528704,204,0,25
49
502021-12-09 16:15:01.400 INFO 13864 --- [ main] kafka.zk.KafkaZkClient : Registered broker 0 at path /brokers/ids/0 with addresses: PLAINTEXT://localhost:63919, czxid (broker epoch): 25
512021-12-09 16:15:01.410 ERROR 13864 --- [ main] kafka.server.BrokerMetadataCheckpoint : Failed to write meta.properties due to
52
53java.nio.file.AccessDeniedException: C:\Users\ddrop\AppData\Local\Temp\spring.kafka.bf8e2b62-a1f2-4092-b292-a15e35bd31ad18378079390566696446
54 at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89) ~[na:na]
55 at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[na:na]
56 at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[na:na]
57package com.example.demo;
58
59import org.junit.jupiter.api.Test;
60import org.springframework.boot.test.context.SpringBootTest;
61import org.springframework.kafka.test.context.EmbeddedKafka;
62
63@SpringBootTest
64@EmbeddedKafka
65class ApplicationTest {
66
67 @Test
68 void run() {
69 int i = 1 + 1; // just a line of code to set a debug-point
70 }
71}
72
I do not have this error when pinning kafka.version
to 2.8.1 in pom.xml's properties.
It seems like the cause is in Kafka itself, but I have a hard time figuring out if it is spring-kafka intitializing Kafka via EmbeddedKafka incorrectly or if Kafka itself is the culrit here.
Anyone has an idea? Am I missing a test-parameter to set?
ANSWER
Answered 2021-Dec-09 at 15:51Known bug on the Apache Kafka side. Nothing to do from Spring perspective. See more info here: https://github.com/spring-projects/spring-kafka/discussions/2027. And here: https://issues.apache.org/jira/browse/KAFKA-13391
You need to wait until Apache Kafka 3.0.1
or don't use embedded Kafka and just rely on the Testcontainers, for example, or fully external Apache Kafka broker.
QUESTION
dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory
Asked 2022-Mar-13 at 10:37I use EndevourOS and have updated my system on February 17 2022 using
sudo pacman -Syu
Eversince, when I run docker-compose, I get this error message:
[4221] Error loading Python lib '/tmp/_MEIgGJQGW/libpython3.7m.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory
Some forum threads suggested to reinstall docker-compose, which I did. I tried following solution. But both without success: Python3.7: error while loading shared libraries: libpython3.7m.so.1.0
How can I resolve this issue?
ANSWER
Answered 2022-Feb-19 at 22:27I found several forum posts explaining to isntall libxcrypt-compat from AUR. I did not like this solution, but apparently, this is the way for now: https://bbs.archlinux.org/viewtopic.php?id=274160&p=2
If there is a PGP key error when building the package from AUR, use this workaround as explained by Stock44 on this page: https://aur.archlinux.org/packages/libxcrypt-compat
1$ gpg --keyserver keyserver.ubuntu.com --recv-key 678CE3FEE430311596DB8C16F52E98007594C21D
2
Posted on behalf of the question asker
QUESTION
Github Actions Failing
Asked 2022-Feb-25 at 02:08Github Actions were working in my repository till yesterday. I didnt make any changes in .github/workflows/dev.yml file or in DockerFile.
But, suddenly in recent pushes, my Github Actions fail with the error
Setup, Build, Publish, and Deploy
1Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
2'/home/runner/work/_actions/GoogleCloudPlatform/github-actions/master/setup-gcloud'.
3Did you forget to run actions/checkout before running your local
4action?
5
May I know how to fix this
This is the sample .yml file I am using.
1Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
2'/home/runner/work/_actions/GoogleCloudPlatform/github-actions/master/setup-gcloud'.
3Did you forget to run actions/checkout before running your local
4action?
5name: Release to Development
6
7on:
8 push:
9 branches:
10 - 'master'
11jobs:
12 setup-build-publish-deploy:
13 name: Setup, Build, Publish, and Deploy
14 runs-on: ubuntu-latest
15 steps:
16
17 - name: Checkout
18 uses: actions/checkout@v2
19
20 # Setup gcloud CLI
21 - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
22 with:
23 version: '270.0.0'
24 service_account_email: ${{ secrets.GCLOUD_EMAIL_DEV }}
25 service_account_key: ${{ secrets.GCLOUD_AUTH_DEV }}
26
27 # Configure docker to use the gcloud command-line tool as a credential helper
28 - run: |
29 # Set up docker to authenticate
30 # via gcloud command-line tool.
31 gcloud auth configure-docker
32
33 # Build the Docker image
34 - name: Build
35 run: |
36 docker build -t "$REGISTRY_HOSTNAME"/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \
37 --build-arg GITHUB_SHA="$GITHUB_SHA" \
38 --build-arg GITHUB_REF="$GITHUB_REF" .
39
40 # Push the Docker image to Google Container Registry
41 - name: Publish
42 run: |
43 docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:$GITHUB_SHA
44
45 # Set up kustomize
46 - name: Set up Kustomize
47 run: |
48 curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
49 chmod u+x ./kustomize
50
51 # Deploy the Docker image to the GKE cluster
52 - name: Deploy
53 run: |
54
ANSWER
Answered 2021-Jul-27 at 13:24I fixed it by changing uses
value to
uses: google-github-actions/setup-gcloud@master
QUESTION
WARNING: Running pip as the 'root' user
Asked 2022-Feb-24 at 01:59I am making simple image of my python Django app in Docker. But at the end of the building container it throws next warning (I am building it on Ubuntu 20.04):
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2
Why does it throw this warning if I am installing Python requirements inside my image? I am building my image using:
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2sudo docker build -t my_app:1 .
3
Should I be worried about warning that pip throws, because I know it can break my system?
Here is my Dockerfile:
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2sudo docker build -t my_app:1 .
3FROM python:3.8-slim-buster
4
5WORKDIR /app
6
7COPY requirements.txt requirements.txt
8
9RUN pip install -r requirements.txt
10
11COPY . .
12
13CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
14
ANSWER
Answered 2021-Aug-29 at 08:12The way your container is built doesn't add a user, so everything is done as root.
You could create a user and install to that users's home directory by doing something like this;
1WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead
2sudo docker build -t my_app:1 .
3FROM python:3.8-slim-buster
4
5WORKDIR /app
6
7COPY requirements.txt requirements.txt
8
9RUN pip install -r requirements.txt
10
11COPY . .
12
13CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
14FROM python:3.8.3-alpine
15
16RUN pip install --upgrade pip
17
18RUN adduser -D myuser
19USER myuser
20WORKDIR /home/myuser
21
22COPY --chown=myuser:myuser requirements.txt requirements.txt
23RUN pip install --user -r requirements.txt
24
25ENV PATH="/home/myuser/.local/bin:${PATH}"
26
27COPY --chown=myuser:myuser . .
28
29CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
30
QUESTION
pip-compile raising AssertionError on its logging handler
Asked 2022-Feb-13 at 12:37I have a dockerfile that currently only installs pip-tools
1FROM python:3.9
2
3RUN pip install --upgrade pip && \
4 pip install pip-tools
5
6COPY ./ /root/project
7
8WORKDIR /root/project
9
10ENTRYPOINT ["tail", "-f", "/dev/null"]
11
I build and open a shell in the container using the following commands:
1FROM python:3.9
2
3RUN pip install --upgrade pip && \
4 pip install pip-tools
5
6COPY ./ /root/project
7
8WORKDIR /root/project
9
10ENTRYPOINT ["tail", "-f", "/dev/null"]
11docker build -t brunoapi_image .
12docker run --rm -ti --name brunoapi_container --entrypoint bash brunoapi_image
13
Then, when I try to run pip-compile
inside the container I get this very weird error (full traceback):
1FROM python:3.9
2
3RUN pip install --upgrade pip && \
4 pip install pip-tools
5
6COPY ./ /root/project
7
8WORKDIR /root/project
9
10ENTRYPOINT ["tail", "-f", "/dev/null"]
11docker build -t brunoapi_image .
12docker run --rm -ti --name brunoapi_container --entrypoint bash brunoapi_image
13root@727f1f38f095:~/project# pip-compile
14Traceback (most recent call last):
15 File "/usr/local/bin/pip-compile", line 8, in <module>
16 sys.exit(cli())
17 File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1128, in __call__
18 return self.main(*args, **kwargs)
19 File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1053, in main
20 rv = self.invoke(ctx)
21 File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1395, in invoke
22 return ctx.invoke(self.callback, **ctx.params)
23 File "/usr/local/lib/python3.9/site-packages/click/core.py", line 754, in invoke
24 return __callback(*args, **kwargs)
25 File "/usr/local/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func
26 return f(get_current_context(), *args, **kwargs)
27 File "/usr/local/lib/python3.9/site-packages/piptools/scripts/compile.py", line 342, in cli
28 repository = PyPIRepository(pip_args, cache_dir=cache_dir)
29 File "/usr/local/lib/python3.9/site-packages/piptools/repositories/pypi.py", line 106, in __init__
30 self._setup_logging()
31 File "/usr/local/lib/python3.9/site-packages/piptools/repositories/pypi.py", line 455, in _setup_logging
32 assert isinstance(handler, logging.StreamHandler)
33AssertionError
34
I have no clue what's going on and I've never seen this error before. Can anyone shed some light into this?
Running on macOS Monterey
ANSWER
Answered 2022-Feb-05 at 16:30It is a bug, you can downgrade using:
pip install "pip<22"
QUESTION
Docker standard_init_linux.go:228: exec user process caused: no such file or directory
Asked 2022-Feb-08 at 20:49Whenever I am trying to run the docker images, it is exiting in immediately.
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3
As per Container Logs
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4
I have created all the files in linux itself:
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4FROM alpine:3.10
5COPY k8s-for-beginners /
6CMD ["/k8s-for-beginners"]
7
GO Code:
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4FROM alpine:3.10
5COPY k8s-for-beginners /
6CMD ["/k8s-for-beginners"]
7package main
8
9import (
10 "fmt"
11 "log"
12 "net/http"
13)
14
15func main() {
16 http.HandleFunc("/", handler)
17 log.Fatal(http.ListenAndServe("0.0.0.0:8080", nil))
18}
19
20func handler(w http.ResponseWriter, r *http.Request) {
21 log.Printf("Ping from %s", r.RemoteAddr)
22 fmt.Fprintln(w, "Hello Kubernetes Beginners!")
23}
24
This is the first exercise from THE KUBERNETES WORKSHOP book.
Commands I have used in this Process:
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4FROM alpine:3.10
5COPY k8s-for-beginners /
6CMD ["/k8s-for-beginners"]
7package main
8
9import (
10 "fmt"
11 "log"
12 "net/http"
13)
14
15func main() {
16 http.HandleFunc("/", handler)
17 log.Fatal(http.ListenAndServe("0.0.0.0:8080", nil))
18}
19
20func handler(w http.ResponseWriter, r *http.Request) {
21 log.Printf("Ping from %s", r.RemoteAddr)
22 fmt.Fprintln(w, "Hello Kubernetes Beginners!")
23}
24CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o k8s-for-beginners
25sudo docker build -t k8s-for-beginners:v0.0.1 .
26sudo docker run -p 8080:8080 -d k8s-for-beginners:v0.0.1
27
Output of sudo docker run k8s-for-beginners:v0.0.1 ldd /k8s-for-beginners
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4FROM alpine:3.10
5COPY k8s-for-beginners /
6CMD ["/k8s-for-beginners"]
7package main
8
9import (
10 "fmt"
11 "log"
12 "net/http"
13)
14
15func main() {
16 http.HandleFunc("/", handler)
17 log.Fatal(http.ListenAndServe("0.0.0.0:8080", nil))
18}
19
20func handler(w http.ResponseWriter, r *http.Request) {
21 log.Printf("Ping from %s", r.RemoteAddr)
22 fmt.Fprintln(w, "Hello Kubernetes Beginners!")
23}
24CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o k8s-for-beginners
25sudo docker build -t k8s-for-beginners:v0.0.1 .
26sudo docker run -p 8080:8080 -d k8s-for-beginners:v0.0.1
27 /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
28 libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
29Error loading shared library libgo.so.16: No such file or directory (needed by /k8s-for-beginners)
30Error loading shared library libgcc_s.so.1: No such file or directory (needed by /k8s-for-beginners)
31Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /k8s-for-beginners)
32Error relocating /k8s-for-beginners: crypto..z2frsa..import: symbol not found
33Error relocating /k8s-for-beginners: crypto..z2fx509..import: symbol not found
34Error relocating /k8s-for-beginners: log..import: symbol not found
35Error relocating /k8s-for-beginners: crypto..z2fmd5..import: symbol not found
36Error relocating /k8s-for-beginners: crypto..import: symbol not found
37Error relocating /k8s-for-beginners: bytes..import: symbol not found
38Error relocating /k8s-for-beginners: fmt.Fprintln: symbol not found
39Error relocating /k8s-for-beginners: crypto..z2felliptic..import: symbol not found
40Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..import: symbol not found
41Error relocating /k8s-for-beginners: crypto..z2frand..import: symbol not found
42Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..import: symbol not found
43Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..import: symbol not found
44Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..import: symbol not found
45Error relocating /k8s-for-beginners: internal..z2foserror..import: symbol not found
46Error relocating /k8s-for-beginners: crypto..z2fecdsa..import: symbol not found
47Error relocating /k8s-for-beginners: net..z2fhttp.HandleFunc: symbol not found
48Error relocating /k8s-for-beginners: io..import: symbol not found
49Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..import: symbol not found
50Error relocating /k8s-for-beginners: crypto..z2fcipher..import: symbol not found
51Error relocating /k8s-for-beginners: log.Fatal: symbol not found
52Error relocating /k8s-for-beginners: math..z2fbig..import: symbol not found
53Error relocating /k8s-for-beginners: runtime..import: symbol not found
54Error relocating /k8s-for-beginners: net..z2fhttp..import: symbol not found
55Error relocating /k8s-for-beginners: hash..z2fcrc32..import: symbol not found
56Error relocating /k8s-for-beginners: net..z2fhttp.ListenAndServe: symbol not found
57Error relocating /k8s-for-beginners: context..import: symbol not found
58Error relocating /k8s-for-beginners: fmt..import: symbol not found
59Error relocating /k8s-for-beginners: crypto..z2ftls..import: symbol not found
60Error relocating /k8s-for-beginners: errors..import: symbol not found
61Error relocating /k8s-for-beginners: internal..z2ftestlog..import: symbol not found
62Error relocating /k8s-for-beginners: runtime.setIsCgo: symbol not found
63Error relocating /k8s-for-beginners: runtime_m: symbol not found
64Error relocating /k8s-for-beginners: encoding..z2fhex..import: symbol not found
65Error relocating /k8s-for-beginners: mime..import: symbol not found
66Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..import: symbol not found
67Error relocating /k8s-for-beginners: internal..z2freflectlite..import: symbol not found
68Error relocating /k8s-for-beginners: compress..z2fgzip..import: symbol not found
69Error relocating /k8s-for-beginners: sync..import: symbol not found
70Error relocating /k8s-for-beginners: compress..z2fflate..import: symbol not found
71Error relocating /k8s-for-beginners: encoding..z2fbinary..import: symbol not found
72Error relocating /k8s-for-beginners: math..z2frand..import: symbol not found
73Error relocating /k8s-for-beginners: runtime_cpuinit: symbol not found
74Error relocating /k8s-for-beginners: internal..z2fpoll..import: symbol not found
75Error relocating /k8s-for-beginners: mime..z2fmultipart..import: symbol not found
76Error relocating /k8s-for-beginners: runtime.check: symbol not found
77Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..import: symbol not found
78Error relocating /k8s-for-beginners: crypto..z2fsha512..import: symbol not found
79Error relocating /k8s-for-beginners: runtime.registerTypeDescriptors: symbol not found
80Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..import: symbol not found
81Error relocating /k8s-for-beginners: runtime.setmodinfo: symbol not found
82Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..import: symbol not found
83Error relocating /k8s-for-beginners: time..import: symbol not found
84Error relocating /k8s-for-beginners: encoding..z2fbase64..import: symbol not found
85Error relocating /k8s-for-beginners: crypto..z2fsha256..import: symbol not found
86Error relocating /k8s-for-beginners: __go_go: symbol not found
87Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..import: symbol not found
88Error relocating /k8s-for-beginners: path..z2ffilepath..import: symbol not found
89Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..import: symbol not found
90Error relocating /k8s-for-beginners: os..import: symbol not found
91Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..import: symbol not found
92Error relocating /k8s-for-beginners: net..z2ftextproto..import: symbol not found
93Error relocating /k8s-for-beginners: encoding..z2fasn1..import: symbol not found
94Error relocating /k8s-for-beginners: runtime.requireitab: symbol not found
95Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..import: symbol not found
96Error relocating /k8s-for-beginners: path..import: symbol not found
97Error relocating /k8s-for-beginners: io..z2fioutil..import: symbol not found
98Error relocating /k8s-for-beginners: sort..import: symbol not found
99Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..import: symbol not found
100Error relocating /k8s-for-beginners: internal..z2fcpu..import: symbol not found
101Error relocating /k8s-for-beginners: runtime.ginit: symbol not found
102Error relocating /k8s-for-beginners: runtime.osinit: symbol not found
103Error relocating /k8s-for-beginners: runtime.schedinit: symbol not found
104Error relocating /k8s-for-beginners: bufio..import: symbol not found
105Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..import: symbol not found
106Error relocating /k8s-for-beginners: runtime_mstart: symbol not found
107Error relocating /k8s-for-beginners: net..import: symbol not found
108Error relocating /k8s-for-beginners: strconv..import: symbol not found
109Error relocating /k8s-for-beginners: runtime.args: symbol not found
110Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..import: symbol not found
111Error relocating /k8s-for-beginners: runtime.newobject: symbol not found
112Error relocating /k8s-for-beginners: syscall..import: symbol not found
113Error relocating /k8s-for-beginners: unicode..import: symbol not found
114Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..import: symbol not found
115Error relocating /k8s-for-beginners: encoding..z2fpem..import: symbol not found
116Error relocating /k8s-for-beginners: _Unwind_Resume: symbol not found
117Error relocating /k8s-for-beginners: reflect..import: symbol not found
118Error relocating /k8s-for-beginners: mime..z2fquotedprintable..import: symbol not found
119Error relocating /k8s-for-beginners: log.Printf: symbol not found
120Error relocating /k8s-for-beginners: runtime.typedmemmove: symbol not found
121Error relocating /k8s-for-beginners: crypto..z2fdsa..import: symbol not found
122Error relocating /k8s-for-beginners: crypto..z2fsha1..import: symbol not found
123Error relocating /k8s-for-beginners: bufio..types: symbol not found
124Error relocating /k8s-for-beginners: bytes..types: symbol not found
125Error relocating /k8s-for-beginners: compress..z2fflate..types: symbol not found
126Error relocating /k8s-for-beginners: compress..z2fgzip..types: symbol not found
127Error relocating /k8s-for-beginners: context..types: symbol not found
128Error relocating /k8s-for-beginners: crypto..types: symbol not found
129Error relocating /k8s-for-beginners: crypto..z2fcipher..types: symbol not found
130Error relocating /k8s-for-beginners: crypto..z2fdsa..types: symbol not found
131Error relocating /k8s-for-beginners: crypto..z2fecdsa..types: symbol not found
132Error relocating /k8s-for-beginners: crypto..z2felliptic..types: symbol not found
133Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..types: symbol not found
134Error relocating /k8s-for-beginners: crypto..z2fmd5..types: symbol not found
135Error relocating /k8s-for-beginners: crypto..z2frand..types: symbol not found
136Error relocating /k8s-for-beginners: crypto..z2frsa..types: symbol not found
137Error relocating /k8s-for-beginners: crypto..z2fsha1..types: symbol not found
138Error relocating /k8s-for-beginners: crypto..z2fsha256..types: symbol not found
139Error relocating /k8s-for-beginners: crypto..z2fsha512..types: symbol not found
140Error relocating /k8s-for-beginners: crypto..z2ftls..types: symbol not found
141Error relocating /k8s-for-beginners: crypto..z2fx509..types: symbol not found
142Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..types: symbol not found
143Error relocating /k8s-for-beginners: encoding..z2fasn1..types: symbol not found
144Error relocating /k8s-for-beginners: encoding..z2fbase64..types: symbol not found
145Error relocating /k8s-for-beginners: encoding..z2fbinary..types: symbol not found
146Error relocating /k8s-for-beginners: encoding..z2fhex..types: symbol not found
147Error relocating /k8s-for-beginners: encoding..z2fpem..types: symbol not found
148Error relocating /k8s-for-beginners: errors..types: symbol not found
149Error relocating /k8s-for-beginners: fmt..types: symbol not found
150Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..types: symbol not found
151Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..types: symbol not found
152Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..types: symbol not found
153Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..types: symbol not found
154Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..types: symbol not found
155Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..types: symbol not found
156Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..types: symbol not found
157Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..types: symbol not found
158Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..types: symbol not found
159Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..types: symbol not found
160Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..types: symbol not found
161Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..types: symbol not found
162Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..types: symbol not found
163Error relocating /k8s-for-beginners: hash..z2fcrc32..types: symbol not found
164Error relocating /k8s-for-beginners: internal..z2fcpu..types: symbol not found
165Error relocating /k8s-for-beginners: internal..z2foserror..types: symbol not found
166Error relocating /k8s-for-beginners: internal..z2fpoll..types: symbol not found
167Error relocating /k8s-for-beginners: internal..z2freflectlite..types: symbol not found
168Error relocating /k8s-for-beginners: internal..z2ftestlog..types: symbol not found
169Error relocating /k8s-for-beginners: io..types: symbol not found
170Error relocating /k8s-for-beginners: io..z2fioutil..types: symbol not found
171Error relocating /k8s-for-beginners: log..types: symbol not found
172Error relocating /k8s-for-beginners: math..z2fbig..types: symbol not found
173Error relocating /k8s-for-beginners: math..z2frand..types: symbol not found
174Error relocating /k8s-for-beginners: mime..types: symbol not found
175Error relocating /k8s-for-beginners: mime..z2fmultipart..types: symbol not found
176Error relocating /k8s-for-beginners: mime..z2fquotedprintable..types: symbol not found
177Error relocating /k8s-for-beginners: net..types: symbol not found
178Error relocating /k8s-for-beginners: net..z2fhttp..types: symbol not found
179Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..types: symbol not found
180Error relocating /k8s-for-beginners: net..z2ftextproto..types: symbol not found
181Error relocating /k8s-for-beginners: os..types: symbol not found
182Error relocating /k8s-for-beginners: path..types: symbol not found
183Error relocating /k8s-for-beginners: path..z2ffilepath..types: symbol not found
184Error relocating /k8s-for-beginners: reflect..types: symbol not found
185Error relocating /k8s-for-beginners: runtime..types: symbol not found
186Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..types: symbol not found
187Error relocating /k8s-for-beginners: sort..types: symbol not found
188Error relocating /k8s-for-beginners: strconv..types: symbol not found
189Error relocating /k8s-for-beginners: sync..types: symbol not found
190Error relocating /k8s-for-beginners: syscall..types: symbol not found
191Error relocating /k8s-for-beginners: time..types: symbol not found
192Error relocating /k8s-for-beginners: unicode..types: symbol not found
193Error relocating /k8s-for-beginners: container..z2flist..types: symbol not found
194Error relocating /k8s-for-beginners: crypto..z2faes..types: symbol not found
195Error relocating /k8s-for-beginners: crypto..z2fdes..types: symbol not found
196Error relocating /k8s-for-beginners: crypto..z2fed25519..types: symbol not found
197Error relocating /k8s-for-beginners: crypto..z2fed25519..z2finternal..z2fedwards25519..types: symbol not found
198Error relocating /k8s-for-beginners: crypto..z2fhmac..types: symbol not found
199Error relocating /k8s-for-beginners: crypto..z2finternal..z2fsubtle..types: symbol not found
200Error relocating /k8s-for-beginners: crypto..z2frc4..types: symbol not found
201Error relocating /k8s-for-beginners: crypto..z2fsubtle..types: symbol not found
202Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..z2fasn1..types: symbol not found
203Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fhkdf..types: symbol not found
204Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2finternal..z2fsubtle..types: symbol not found
205Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fpoly1305..types: symbol not found
206Error relocating /k8s-for-beginners: hash..types: symbol not found
207Error relocating /k8s-for-beginners: internal..z2fbytealg..types: symbol not found
208Error relocating /k8s-for-beginners: internal..z2ffmtsort..types: symbol not found
209Error relocating /k8s-for-beginners: internal..z2fnettrace..types: symbol not found
210Error relocating /k8s-for-beginners: internal..z2frace..types: symbol not found
211Error relocating /k8s-for-beginners: internal..z2fsingleflight..types: symbol not found
212Error relocating /k8s-for-beginners: internal..z2fsyscall..z2fexecenv..types: symbol not found
213Error relocating /k8s-for-beginners: internal..z2fsyscall..z2funix..types: symbol not found
214Error relocating /k8s-for-beginners: math..types: symbol not found
215Error relocating /k8s-for-beginners: math..z2fbits..types: symbol not found
216Error relocating /k8s-for-beginners: net..z2fhttp..z2fhttptrace..types: symbol not found
217Error relocating /k8s-for-beginners: net..z2furl..types: symbol not found
218Error relocating /k8s-for-beginners: runtime..z2finternal..z2fatomic..types: symbol not found
219Error relocating /k8s-for-beginners: runtime..z2finternal..z2fmath..types: symbol not found
220Error relocating /k8s-for-beginners: strings..types: symbol not found
221Error relocating /k8s-for-beginners: sync..z2fatomic..types: symbol not found
222Error relocating /k8s-for-beginners: unicode..z2futf16..types: symbol not found
223Error relocating /k8s-for-beginners: unicode..z2futf8..types: symbol not found
224Error relocating /k8s-for-beginners: runtime.strequal..f: symbol not found
225Error relocating /k8s-for-beginners: runtime.memequal64..f: symbol not found
226Error relocating /k8s-for-beginners: type...1reflect.rtype: symbol not found
227Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
228Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
229Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
230Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
231Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
232Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
233Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
234Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
235Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
236Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
237Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
238Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
239Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
240Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
241Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
242Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
243Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
244Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
245Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
246Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
247Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
248Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
249Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
250Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
251Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
252Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
253Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
254Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
255Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
256Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
257Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
258Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
259Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
260Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
261Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
262Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
263Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
264Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
265Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
266Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
267Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
268Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
269Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
270Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
271Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
272Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
273Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
274Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
275Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
276Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
277Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
278Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
279Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
280Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
281Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
282Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
283Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
284Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
285Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
286Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
287Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
288Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
289Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
290Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
291Error relocating /k8s-for-beginners: reflect..reflect.rtype..d: symbol not found
292Error relocating /k8s-for-beginners: type...1net.IPAddr: symbol not found
293Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
294Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
295Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
296Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
297Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
298Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
299Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
300Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
301Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
302Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
303Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
304Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
305Error relocating /k8s-for-beginners: net.IPAddr..d: symbol not found
306Error relocating /k8s-for-beginners: runtime.main: symbol not found
307Error relocating /k8s-for-beginners: runtime_iscgo: symbol not found
308Error relocating /k8s-for-beginners: runtime_isstarted: symbol not found
309Error relocating /k8s-for-beginners: runtime_isarchive: symbol not found
310Error relocating /k8s-for-beginners: __gcc_personality_v0: symbol not found
311Error relocating /k8s-for-beginners: io.Writer..d: symbol not found
312Error relocating /k8s-for-beginners: runtime.writeBarrier: symbol not found
313
314
ANSWER
Answered 2021-Aug-22 at 15:41Since you're already using Docker
, I'd suggest using a multi-stage build. Using a standard docker image like golang
one can build an executable asset which is guaranteed to work with other docker linux images:
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4FROM alpine:3.10
5COPY k8s-for-beginners /
6CMD ["/k8s-for-beginners"]
7package main
8
9import (
10 "fmt"
11 "log"
12 "net/http"
13)
14
15func main() {
16 http.HandleFunc("/", handler)
17 log.Fatal(http.ListenAndServe("0.0.0.0:8080", nil))
18}
19
20func handler(w http.ResponseWriter, r *http.Request) {
21 log.Printf("Ping from %s", r.RemoteAddr)
22 fmt.Fprintln(w, "Hello Kubernetes Beginners!")
23}
24CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o k8s-for-beginners
25sudo docker build -t k8s-for-beginners:v0.0.1 .
26sudo docker run -p 8080:8080 -d k8s-for-beginners:v0.0.1
27 /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
28 libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
29Error loading shared library libgo.so.16: No such file or directory (needed by /k8s-for-beginners)
30Error loading shared library libgcc_s.so.1: No such file or directory (needed by /k8s-for-beginners)
31Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /k8s-for-beginners)
32Error relocating /k8s-for-beginners: crypto..z2frsa..import: symbol not found
33Error relocating /k8s-for-beginners: crypto..z2fx509..import: symbol not found
34Error relocating /k8s-for-beginners: log..import: symbol not found
35Error relocating /k8s-for-beginners: crypto..z2fmd5..import: symbol not found
36Error relocating /k8s-for-beginners: crypto..import: symbol not found
37Error relocating /k8s-for-beginners: bytes..import: symbol not found
38Error relocating /k8s-for-beginners: fmt.Fprintln: symbol not found
39Error relocating /k8s-for-beginners: crypto..z2felliptic..import: symbol not found
40Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..import: symbol not found
41Error relocating /k8s-for-beginners: crypto..z2frand..import: symbol not found
42Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..import: symbol not found
43Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..import: symbol not found
44Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..import: symbol not found
45Error relocating /k8s-for-beginners: internal..z2foserror..import: symbol not found
46Error relocating /k8s-for-beginners: crypto..z2fecdsa..import: symbol not found
47Error relocating /k8s-for-beginners: net..z2fhttp.HandleFunc: symbol not found
48Error relocating /k8s-for-beginners: io..import: symbol not found
49Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..import: symbol not found
50Error relocating /k8s-for-beginners: crypto..z2fcipher..import: symbol not found
51Error relocating /k8s-for-beginners: log.Fatal: symbol not found
52Error relocating /k8s-for-beginners: math..z2fbig..import: symbol not found
53Error relocating /k8s-for-beginners: runtime..import: symbol not found
54Error relocating /k8s-for-beginners: net..z2fhttp..import: symbol not found
55Error relocating /k8s-for-beginners: hash..z2fcrc32..import: symbol not found
56Error relocating /k8s-for-beginners: net..z2fhttp.ListenAndServe: symbol not found
57Error relocating /k8s-for-beginners: context..import: symbol not found
58Error relocating /k8s-for-beginners: fmt..import: symbol not found
59Error relocating /k8s-for-beginners: crypto..z2ftls..import: symbol not found
60Error relocating /k8s-for-beginners: errors..import: symbol not found
61Error relocating /k8s-for-beginners: internal..z2ftestlog..import: symbol not found
62Error relocating /k8s-for-beginners: runtime.setIsCgo: symbol not found
63Error relocating /k8s-for-beginners: runtime_m: symbol not found
64Error relocating /k8s-for-beginners: encoding..z2fhex..import: symbol not found
65Error relocating /k8s-for-beginners: mime..import: symbol not found
66Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..import: symbol not found
67Error relocating /k8s-for-beginners: internal..z2freflectlite..import: symbol not found
68Error relocating /k8s-for-beginners: compress..z2fgzip..import: symbol not found
69Error relocating /k8s-for-beginners: sync..import: symbol not found
70Error relocating /k8s-for-beginners: compress..z2fflate..import: symbol not found
71Error relocating /k8s-for-beginners: encoding..z2fbinary..import: symbol not found
72Error relocating /k8s-for-beginners: math..z2frand..import: symbol not found
73Error relocating /k8s-for-beginners: runtime_cpuinit: symbol not found
74Error relocating /k8s-for-beginners: internal..z2fpoll..import: symbol not found
75Error relocating /k8s-for-beginners: mime..z2fmultipart..import: symbol not found
76Error relocating /k8s-for-beginners: runtime.check: symbol not found
77Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..import: symbol not found
78Error relocating /k8s-for-beginners: crypto..z2fsha512..import: symbol not found
79Error relocating /k8s-for-beginners: runtime.registerTypeDescriptors: symbol not found
80Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..import: symbol not found
81Error relocating /k8s-for-beginners: runtime.setmodinfo: symbol not found
82Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..import: symbol not found
83Error relocating /k8s-for-beginners: time..import: symbol not found
84Error relocating /k8s-for-beginners: encoding..z2fbase64..import: symbol not found
85Error relocating /k8s-for-beginners: crypto..z2fsha256..import: symbol not found
86Error relocating /k8s-for-beginners: __go_go: symbol not found
87Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..import: symbol not found
88Error relocating /k8s-for-beginners: path..z2ffilepath..import: symbol not found
89Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..import: symbol not found
90Error relocating /k8s-for-beginners: os..import: symbol not found
91Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..import: symbol not found
92Error relocating /k8s-for-beginners: net..z2ftextproto..import: symbol not found
93Error relocating /k8s-for-beginners: encoding..z2fasn1..import: symbol not found
94Error relocating /k8s-for-beginners: runtime.requireitab: symbol not found
95Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..import: symbol not found
96Error relocating /k8s-for-beginners: path..import: symbol not found
97Error relocating /k8s-for-beginners: io..z2fioutil..import: symbol not found
98Error relocating /k8s-for-beginners: sort..import: symbol not found
99Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..import: symbol not found
100Error relocating /k8s-for-beginners: internal..z2fcpu..import: symbol not found
101Error relocating /k8s-for-beginners: runtime.ginit: symbol not found
102Error relocating /k8s-for-beginners: runtime.osinit: symbol not found
103Error relocating /k8s-for-beginners: runtime.schedinit: symbol not found
104Error relocating /k8s-for-beginners: bufio..import: symbol not found
105Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..import: symbol not found
106Error relocating /k8s-for-beginners: runtime_mstart: symbol not found
107Error relocating /k8s-for-beginners: net..import: symbol not found
108Error relocating /k8s-for-beginners: strconv..import: symbol not found
109Error relocating /k8s-for-beginners: runtime.args: symbol not found
110Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..import: symbol not found
111Error relocating /k8s-for-beginners: runtime.newobject: symbol not found
112Error relocating /k8s-for-beginners: syscall..import: symbol not found
113Error relocating /k8s-for-beginners: unicode..import: symbol not found
114Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..import: symbol not found
115Error relocating /k8s-for-beginners: encoding..z2fpem..import: symbol not found
116Error relocating /k8s-for-beginners: _Unwind_Resume: symbol not found
117Error relocating /k8s-for-beginners: reflect..import: symbol not found
118Error relocating /k8s-for-beginners: mime..z2fquotedprintable..import: symbol not found
119Error relocating /k8s-for-beginners: log.Printf: symbol not found
120Error relocating /k8s-for-beginners: runtime.typedmemmove: symbol not found
121Error relocating /k8s-for-beginners: crypto..z2fdsa..import: symbol not found
122Error relocating /k8s-for-beginners: crypto..z2fsha1..import: symbol not found
123Error relocating /k8s-for-beginners: bufio..types: symbol not found
124Error relocating /k8s-for-beginners: bytes..types: symbol not found
125Error relocating /k8s-for-beginners: compress..z2fflate..types: symbol not found
126Error relocating /k8s-for-beginners: compress..z2fgzip..types: symbol not found
127Error relocating /k8s-for-beginners: context..types: symbol not found
128Error relocating /k8s-for-beginners: crypto..types: symbol not found
129Error relocating /k8s-for-beginners: crypto..z2fcipher..types: symbol not found
130Error relocating /k8s-for-beginners: crypto..z2fdsa..types: symbol not found
131Error relocating /k8s-for-beginners: crypto..z2fecdsa..types: symbol not found
132Error relocating /k8s-for-beginners: crypto..z2felliptic..types: symbol not found
133Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..types: symbol not found
134Error relocating /k8s-for-beginners: crypto..z2fmd5..types: symbol not found
135Error relocating /k8s-for-beginners: crypto..z2frand..types: symbol not found
136Error relocating /k8s-for-beginners: crypto..z2frsa..types: symbol not found
137Error relocating /k8s-for-beginners: crypto..z2fsha1..types: symbol not found
138Error relocating /k8s-for-beginners: crypto..z2fsha256..types: symbol not found
139Error relocating /k8s-for-beginners: crypto..z2fsha512..types: symbol not found
140Error relocating /k8s-for-beginners: crypto..z2ftls..types: symbol not found
141Error relocating /k8s-for-beginners: crypto..z2fx509..types: symbol not found
142Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..types: symbol not found
143Error relocating /k8s-for-beginners: encoding..z2fasn1..types: symbol not found
144Error relocating /k8s-for-beginners: encoding..z2fbase64..types: symbol not found
145Error relocating /k8s-for-beginners: encoding..z2fbinary..types: symbol not found
146Error relocating /k8s-for-beginners: encoding..z2fhex..types: symbol not found
147Error relocating /k8s-for-beginners: encoding..z2fpem..types: symbol not found
148Error relocating /k8s-for-beginners: errors..types: symbol not found
149Error relocating /k8s-for-beginners: fmt..types: symbol not found
150Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..types: symbol not found
151Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..types: symbol not found
152Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..types: symbol not found
153Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..types: symbol not found
154Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..types: symbol not found
155Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..types: symbol not found
156Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..types: symbol not found
157Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..types: symbol not found
158Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..types: symbol not found
159Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..types: symbol not found
160Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..types: symbol not found
161Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..types: symbol not found
162Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..types: symbol not found
163Error relocating /k8s-for-beginners: hash..z2fcrc32..types: symbol not found
164Error relocating /k8s-for-beginners: internal..z2fcpu..types: symbol not found
165Error relocating /k8s-for-beginners: internal..z2foserror..types: symbol not found
166Error relocating /k8s-for-beginners: internal..z2fpoll..types: symbol not found
167Error relocating /k8s-for-beginners: internal..z2freflectlite..types: symbol not found
168Error relocating /k8s-for-beginners: internal..z2ftestlog..types: symbol not found
169Error relocating /k8s-for-beginners: io..types: symbol not found
170Error relocating /k8s-for-beginners: io..z2fioutil..types: symbol not found
171Error relocating /k8s-for-beginners: log..types: symbol not found
172Error relocating /k8s-for-beginners: math..z2fbig..types: symbol not found
173Error relocating /k8s-for-beginners: math..z2frand..types: symbol not found
174Error relocating /k8s-for-beginners: mime..types: symbol not found
175Error relocating /k8s-for-beginners: mime..z2fmultipart..types: symbol not found
176Error relocating /k8s-for-beginners: mime..z2fquotedprintable..types: symbol not found
177Error relocating /k8s-for-beginners: net..types: symbol not found
178Error relocating /k8s-for-beginners: net..z2fhttp..types: symbol not found
179Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..types: symbol not found
180Error relocating /k8s-for-beginners: net..z2ftextproto..types: symbol not found
181Error relocating /k8s-for-beginners: os..types: symbol not found
182Error relocating /k8s-for-beginners: path..types: symbol not found
183Error relocating /k8s-for-beginners: path..z2ffilepath..types: symbol not found
184Error relocating /k8s-for-beginners: reflect..types: symbol not found
185Error relocating /k8s-for-beginners: runtime..types: symbol not found
186Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..types: symbol not found
187Error relocating /k8s-for-beginners: sort..types: symbol not found
188Error relocating /k8s-for-beginners: strconv..types: symbol not found
189Error relocating /k8s-for-beginners: sync..types: symbol not found
190Error relocating /k8s-for-beginners: syscall..types: symbol not found
191Error relocating /k8s-for-beginners: time..types: symbol not found
192Error relocating /k8s-for-beginners: unicode..types: symbol not found
193Error relocating /k8s-for-beginners: container..z2flist..types: symbol not found
194Error relocating /k8s-for-beginners: crypto..z2faes..types: symbol not found
195Error relocating /k8s-for-beginners: crypto..z2fdes..types: symbol not found
196Error relocating /k8s-for-beginners: crypto..z2fed25519..types: symbol not found
197Error relocating /k8s-for-beginners: crypto..z2fed25519..z2finternal..z2fedwards25519..types: symbol not found
198Error relocating /k8s-for-beginners: crypto..z2fhmac..types: symbol not found
199Error relocating /k8s-for-beginners: crypto..z2finternal..z2fsubtle..types: symbol not found
200Error relocating /k8s-for-beginners: crypto..z2frc4..types: symbol not found
201Error relocating /k8s-for-beginners: crypto..z2fsubtle..types: symbol not found
202Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..z2fasn1..types: symbol not found
203Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fhkdf..types: symbol not found
204Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2finternal..z2fsubtle..types: symbol not found
205Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fpoly1305..types: symbol not found
206Error relocating /k8s-for-beginners: hash..types: symbol not found
207Error relocating /k8s-for-beginners: internal..z2fbytealg..types: symbol not found
208Error relocating /k8s-for-beginners: internal..z2ffmtsort..types: symbol not found
209Error relocating /k8s-for-beginners: internal..z2fnettrace..types: symbol not found
210Error relocating /k8s-for-beginners: internal..z2frace..types: symbol not found
211Error relocating /k8s-for-beginners: internal..z2fsingleflight..types: symbol not found
212Error relocating /k8s-for-beginners: internal..z2fsyscall..z2fexecenv..types: symbol not found
213Error relocating /k8s-for-beginners: internal..z2fsyscall..z2funix..types: symbol not found
214Error relocating /k8s-for-beginners: math..types: symbol not found
215Error relocating /k8s-for-beginners: math..z2fbits..types: symbol not found
216Error relocating /k8s-for-beginners: net..z2fhttp..z2fhttptrace..types: symbol not found
217Error relocating /k8s-for-beginners: net..z2furl..types: symbol not found
218Error relocating /k8s-for-beginners: runtime..z2finternal..z2fatomic..types: symbol not found
219Error relocating /k8s-for-beginners: runtime..z2finternal..z2fmath..types: symbol not found
220Error relocating /k8s-for-beginners: strings..types: symbol not found
221Error relocating /k8s-for-beginners: sync..z2fatomic..types: symbol not found
222Error relocating /k8s-for-beginners: unicode..z2futf16..types: symbol not found
223Error relocating /k8s-for-beginners: unicode..z2futf8..types: symbol not found
224Error relocating /k8s-for-beginners: runtime.strequal..f: symbol not found
225Error relocating /k8s-for-beginners: runtime.memequal64..f: symbol not found
226Error relocating /k8s-for-beginners: type...1reflect.rtype: symbol not found
227Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
228Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
229Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
230Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
231Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
232Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
233Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
234Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
235Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
236Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
237Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
238Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
239Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
240Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
241Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
242Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
243Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
244Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
245Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
246Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
247Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
248Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
249Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
250Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
251Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
252Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
253Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
254Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
255Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
256Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
257Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
258Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
259Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
260Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
261Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
262Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
263Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
264Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
265Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
266Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
267Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
268Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
269Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
270Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
271Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
272Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
273Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
274Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
275Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
276Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
277Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
278Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
279Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
280Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
281Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
282Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
283Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
284Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
285Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
286Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
287Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
288Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
289Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
290Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
291Error relocating /k8s-for-beginners: reflect..reflect.rtype..d: symbol not found
292Error relocating /k8s-for-beginners: type...1net.IPAddr: symbol not found
293Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
294Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
295Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
296Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
297Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
298Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
299Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
300Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
301Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
302Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
303Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
304Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
305Error relocating /k8s-for-beginners: net.IPAddr..d: symbol not found
306Error relocating /k8s-for-beginners: runtime.main: symbol not found
307Error relocating /k8s-for-beginners: runtime_iscgo: symbol not found
308Error relocating /k8s-for-beginners: runtime_isstarted: symbol not found
309Error relocating /k8s-for-beginners: runtime_isarchive: symbol not found
310Error relocating /k8s-for-beginners: __gcc_personality_v0: symbol not found
311Error relocating /k8s-for-beginners: io.Writer..d: symbol not found
312Error relocating /k8s-for-beginners: runtime.writeBarrier: symbol not found
313
314FROM golang:1.17 as builder
315
316# first (build) stage
317
318WORKDIR /app
319COPY . .
320RUN go mod download
321RUN CGO_ENABLED=0 go build -o k8s-for-beginners
322
323# final (target) stage
324
325FROM alpine:3.10
326COPY --from=builder /app/k8s-for-beginners /
327CMD ["/k8s-for-beginners"]
328
Note: you since you are using CGO_ENABLED=0
you can run your app in a much smaller scratch
container. To do so replace FROM alpine:3.10
with FROM scratch
P.S. ensure you have a go.mod
file in the same directory as the Go
source and Dockerfile
:
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4FROM alpine:3.10
5COPY k8s-for-beginners /
6CMD ["/k8s-for-beginners"]
7package main
8
9import (
10 "fmt"
11 "log"
12 "net/http"
13)
14
15func main() {
16 http.HandleFunc("/", handler)
17 log.Fatal(http.ListenAndServe("0.0.0.0:8080", nil))
18}
19
20func handler(w http.ResponseWriter, r *http.Request) {
21 log.Printf("Ping from %s", r.RemoteAddr)
22 fmt.Fprintln(w, "Hello Kubernetes Beginners!")
23}
24CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o k8s-for-beginners
25sudo docker build -t k8s-for-beginners:v0.0.1 .
26sudo docker run -p 8080:8080 -d k8s-for-beginners:v0.0.1
27 /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
28 libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
29Error loading shared library libgo.so.16: No such file or directory (needed by /k8s-for-beginners)
30Error loading shared library libgcc_s.so.1: No such file or directory (needed by /k8s-for-beginners)
31Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /k8s-for-beginners)
32Error relocating /k8s-for-beginners: crypto..z2frsa..import: symbol not found
33Error relocating /k8s-for-beginners: crypto..z2fx509..import: symbol not found
34Error relocating /k8s-for-beginners: log..import: symbol not found
35Error relocating /k8s-for-beginners: crypto..z2fmd5..import: symbol not found
36Error relocating /k8s-for-beginners: crypto..import: symbol not found
37Error relocating /k8s-for-beginners: bytes..import: symbol not found
38Error relocating /k8s-for-beginners: fmt.Fprintln: symbol not found
39Error relocating /k8s-for-beginners: crypto..z2felliptic..import: symbol not found
40Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..import: symbol not found
41Error relocating /k8s-for-beginners: crypto..z2frand..import: symbol not found
42Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..import: symbol not found
43Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..import: symbol not found
44Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..import: symbol not found
45Error relocating /k8s-for-beginners: internal..z2foserror..import: symbol not found
46Error relocating /k8s-for-beginners: crypto..z2fecdsa..import: symbol not found
47Error relocating /k8s-for-beginners: net..z2fhttp.HandleFunc: symbol not found
48Error relocating /k8s-for-beginners: io..import: symbol not found
49Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..import: symbol not found
50Error relocating /k8s-for-beginners: crypto..z2fcipher..import: symbol not found
51Error relocating /k8s-for-beginners: log.Fatal: symbol not found
52Error relocating /k8s-for-beginners: math..z2fbig..import: symbol not found
53Error relocating /k8s-for-beginners: runtime..import: symbol not found
54Error relocating /k8s-for-beginners: net..z2fhttp..import: symbol not found
55Error relocating /k8s-for-beginners: hash..z2fcrc32..import: symbol not found
56Error relocating /k8s-for-beginners: net..z2fhttp.ListenAndServe: symbol not found
57Error relocating /k8s-for-beginners: context..import: symbol not found
58Error relocating /k8s-for-beginners: fmt..import: symbol not found
59Error relocating /k8s-for-beginners: crypto..z2ftls..import: symbol not found
60Error relocating /k8s-for-beginners: errors..import: symbol not found
61Error relocating /k8s-for-beginners: internal..z2ftestlog..import: symbol not found
62Error relocating /k8s-for-beginners: runtime.setIsCgo: symbol not found
63Error relocating /k8s-for-beginners: runtime_m: symbol not found
64Error relocating /k8s-for-beginners: encoding..z2fhex..import: symbol not found
65Error relocating /k8s-for-beginners: mime..import: symbol not found
66Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..import: symbol not found
67Error relocating /k8s-for-beginners: internal..z2freflectlite..import: symbol not found
68Error relocating /k8s-for-beginners: compress..z2fgzip..import: symbol not found
69Error relocating /k8s-for-beginners: sync..import: symbol not found
70Error relocating /k8s-for-beginners: compress..z2fflate..import: symbol not found
71Error relocating /k8s-for-beginners: encoding..z2fbinary..import: symbol not found
72Error relocating /k8s-for-beginners: math..z2frand..import: symbol not found
73Error relocating /k8s-for-beginners: runtime_cpuinit: symbol not found
74Error relocating /k8s-for-beginners: internal..z2fpoll..import: symbol not found
75Error relocating /k8s-for-beginners: mime..z2fmultipart..import: symbol not found
76Error relocating /k8s-for-beginners: runtime.check: symbol not found
77Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..import: symbol not found
78Error relocating /k8s-for-beginners: crypto..z2fsha512..import: symbol not found
79Error relocating /k8s-for-beginners: runtime.registerTypeDescriptors: symbol not found
80Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..import: symbol not found
81Error relocating /k8s-for-beginners: runtime.setmodinfo: symbol not found
82Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..import: symbol not found
83Error relocating /k8s-for-beginners: time..import: symbol not found
84Error relocating /k8s-for-beginners: encoding..z2fbase64..import: symbol not found
85Error relocating /k8s-for-beginners: crypto..z2fsha256..import: symbol not found
86Error relocating /k8s-for-beginners: __go_go: symbol not found
87Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..import: symbol not found
88Error relocating /k8s-for-beginners: path..z2ffilepath..import: symbol not found
89Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..import: symbol not found
90Error relocating /k8s-for-beginners: os..import: symbol not found
91Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..import: symbol not found
92Error relocating /k8s-for-beginners: net..z2ftextproto..import: symbol not found
93Error relocating /k8s-for-beginners: encoding..z2fasn1..import: symbol not found
94Error relocating /k8s-for-beginners: runtime.requireitab: symbol not found
95Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..import: symbol not found
96Error relocating /k8s-for-beginners: path..import: symbol not found
97Error relocating /k8s-for-beginners: io..z2fioutil..import: symbol not found
98Error relocating /k8s-for-beginners: sort..import: symbol not found
99Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..import: symbol not found
100Error relocating /k8s-for-beginners: internal..z2fcpu..import: symbol not found
101Error relocating /k8s-for-beginners: runtime.ginit: symbol not found
102Error relocating /k8s-for-beginners: runtime.osinit: symbol not found
103Error relocating /k8s-for-beginners: runtime.schedinit: symbol not found
104Error relocating /k8s-for-beginners: bufio..import: symbol not found
105Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..import: symbol not found
106Error relocating /k8s-for-beginners: runtime_mstart: symbol not found
107Error relocating /k8s-for-beginners: net..import: symbol not found
108Error relocating /k8s-for-beginners: strconv..import: symbol not found
109Error relocating /k8s-for-beginners: runtime.args: symbol not found
110Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..import: symbol not found
111Error relocating /k8s-for-beginners: runtime.newobject: symbol not found
112Error relocating /k8s-for-beginners: syscall..import: symbol not found
113Error relocating /k8s-for-beginners: unicode..import: symbol not found
114Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..import: symbol not found
115Error relocating /k8s-for-beginners: encoding..z2fpem..import: symbol not found
116Error relocating /k8s-for-beginners: _Unwind_Resume: symbol not found
117Error relocating /k8s-for-beginners: reflect..import: symbol not found
118Error relocating /k8s-for-beginners: mime..z2fquotedprintable..import: symbol not found
119Error relocating /k8s-for-beginners: log.Printf: symbol not found
120Error relocating /k8s-for-beginners: runtime.typedmemmove: symbol not found
121Error relocating /k8s-for-beginners: crypto..z2fdsa..import: symbol not found
122Error relocating /k8s-for-beginners: crypto..z2fsha1..import: symbol not found
123Error relocating /k8s-for-beginners: bufio..types: symbol not found
124Error relocating /k8s-for-beginners: bytes..types: symbol not found
125Error relocating /k8s-for-beginners: compress..z2fflate..types: symbol not found
126Error relocating /k8s-for-beginners: compress..z2fgzip..types: symbol not found
127Error relocating /k8s-for-beginners: context..types: symbol not found
128Error relocating /k8s-for-beginners: crypto..types: symbol not found
129Error relocating /k8s-for-beginners: crypto..z2fcipher..types: symbol not found
130Error relocating /k8s-for-beginners: crypto..z2fdsa..types: symbol not found
131Error relocating /k8s-for-beginners: crypto..z2fecdsa..types: symbol not found
132Error relocating /k8s-for-beginners: crypto..z2felliptic..types: symbol not found
133Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..types: symbol not found
134Error relocating /k8s-for-beginners: crypto..z2fmd5..types: symbol not found
135Error relocating /k8s-for-beginners: crypto..z2frand..types: symbol not found
136Error relocating /k8s-for-beginners: crypto..z2frsa..types: symbol not found
137Error relocating /k8s-for-beginners: crypto..z2fsha1..types: symbol not found
138Error relocating /k8s-for-beginners: crypto..z2fsha256..types: symbol not found
139Error relocating /k8s-for-beginners: crypto..z2fsha512..types: symbol not found
140Error relocating /k8s-for-beginners: crypto..z2ftls..types: symbol not found
141Error relocating /k8s-for-beginners: crypto..z2fx509..types: symbol not found
142Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..types: symbol not found
143Error relocating /k8s-for-beginners: encoding..z2fasn1..types: symbol not found
144Error relocating /k8s-for-beginners: encoding..z2fbase64..types: symbol not found
145Error relocating /k8s-for-beginners: encoding..z2fbinary..types: symbol not found
146Error relocating /k8s-for-beginners: encoding..z2fhex..types: symbol not found
147Error relocating /k8s-for-beginners: encoding..z2fpem..types: symbol not found
148Error relocating /k8s-for-beginners: errors..types: symbol not found
149Error relocating /k8s-for-beginners: fmt..types: symbol not found
150Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..types: symbol not found
151Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..types: symbol not found
152Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..types: symbol not found
153Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..types: symbol not found
154Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..types: symbol not found
155Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..types: symbol not found
156Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..types: symbol not found
157Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..types: symbol not found
158Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..types: symbol not found
159Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..types: symbol not found
160Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..types: symbol not found
161Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..types: symbol not found
162Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..types: symbol not found
163Error relocating /k8s-for-beginners: hash..z2fcrc32..types: symbol not found
164Error relocating /k8s-for-beginners: internal..z2fcpu..types: symbol not found
165Error relocating /k8s-for-beginners: internal..z2foserror..types: symbol not found
166Error relocating /k8s-for-beginners: internal..z2fpoll..types: symbol not found
167Error relocating /k8s-for-beginners: internal..z2freflectlite..types: symbol not found
168Error relocating /k8s-for-beginners: internal..z2ftestlog..types: symbol not found
169Error relocating /k8s-for-beginners: io..types: symbol not found
170Error relocating /k8s-for-beginners: io..z2fioutil..types: symbol not found
171Error relocating /k8s-for-beginners: log..types: symbol not found
172Error relocating /k8s-for-beginners: math..z2fbig..types: symbol not found
173Error relocating /k8s-for-beginners: math..z2frand..types: symbol not found
174Error relocating /k8s-for-beginners: mime..types: symbol not found
175Error relocating /k8s-for-beginners: mime..z2fmultipart..types: symbol not found
176Error relocating /k8s-for-beginners: mime..z2fquotedprintable..types: symbol not found
177Error relocating /k8s-for-beginners: net..types: symbol not found
178Error relocating /k8s-for-beginners: net..z2fhttp..types: symbol not found
179Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..types: symbol not found
180Error relocating /k8s-for-beginners: net..z2ftextproto..types: symbol not found
181Error relocating /k8s-for-beginners: os..types: symbol not found
182Error relocating /k8s-for-beginners: path..types: symbol not found
183Error relocating /k8s-for-beginners: path..z2ffilepath..types: symbol not found
184Error relocating /k8s-for-beginners: reflect..types: symbol not found
185Error relocating /k8s-for-beginners: runtime..types: symbol not found
186Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..types: symbol not found
187Error relocating /k8s-for-beginners: sort..types: symbol not found
188Error relocating /k8s-for-beginners: strconv..types: symbol not found
189Error relocating /k8s-for-beginners: sync..types: symbol not found
190Error relocating /k8s-for-beginners: syscall..types: symbol not found
191Error relocating /k8s-for-beginners: time..types: symbol not found
192Error relocating /k8s-for-beginners: unicode..types: symbol not found
193Error relocating /k8s-for-beginners: container..z2flist..types: symbol not found
194Error relocating /k8s-for-beginners: crypto..z2faes..types: symbol not found
195Error relocating /k8s-for-beginners: crypto..z2fdes..types: symbol not found
196Error relocating /k8s-for-beginners: crypto..z2fed25519..types: symbol not found
197Error relocating /k8s-for-beginners: crypto..z2fed25519..z2finternal..z2fedwards25519..types: symbol not found
198Error relocating /k8s-for-beginners: crypto..z2fhmac..types: symbol not found
199Error relocating /k8s-for-beginners: crypto..z2finternal..z2fsubtle..types: symbol not found
200Error relocating /k8s-for-beginners: crypto..z2frc4..types: symbol not found
201Error relocating /k8s-for-beginners: crypto..z2fsubtle..types: symbol not found
202Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..z2fasn1..types: symbol not found
203Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fhkdf..types: symbol not found
204Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2finternal..z2fsubtle..types: symbol not found
205Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fpoly1305..types: symbol not found
206Error relocating /k8s-for-beginners: hash..types: symbol not found
207Error relocating /k8s-for-beginners: internal..z2fbytealg..types: symbol not found
208Error relocating /k8s-for-beginners: internal..z2ffmtsort..types: symbol not found
209Error relocating /k8s-for-beginners: internal..z2fnettrace..types: symbol not found
210Error relocating /k8s-for-beginners: internal..z2frace..types: symbol not found
211Error relocating /k8s-for-beginners: internal..z2fsingleflight..types: symbol not found
212Error relocating /k8s-for-beginners: internal..z2fsyscall..z2fexecenv..types: symbol not found
213Error relocating /k8s-for-beginners: internal..z2fsyscall..z2funix..types: symbol not found
214Error relocating /k8s-for-beginners: math..types: symbol not found
215Error relocating /k8s-for-beginners: math..z2fbits..types: symbol not found
216Error relocating /k8s-for-beginners: net..z2fhttp..z2fhttptrace..types: symbol not found
217Error relocating /k8s-for-beginners: net..z2furl..types: symbol not found
218Error relocating /k8s-for-beginners: runtime..z2finternal..z2fatomic..types: symbol not found
219Error relocating /k8s-for-beginners: runtime..z2finternal..z2fmath..types: symbol not found
220Error relocating /k8s-for-beginners: strings..types: symbol not found
221Error relocating /k8s-for-beginners: sync..z2fatomic..types: symbol not found
222Error relocating /k8s-for-beginners: unicode..z2futf16..types: symbol not found
223Error relocating /k8s-for-beginners: unicode..z2futf8..types: symbol not found
224Error relocating /k8s-for-beginners: runtime.strequal..f: symbol not found
225Error relocating /k8s-for-beginners: runtime.memequal64..f: symbol not found
226Error relocating /k8s-for-beginners: type...1reflect.rtype: symbol not found
227Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
228Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
229Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
230Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
231Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
232Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
233Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
234Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
235Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
236Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
237Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
238Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
239Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
240Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
241Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
242Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
243Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
244Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
245Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
246Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
247Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
248Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
249Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
250Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
251Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
252Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
253Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
254Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
255Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
256Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
257Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
258Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
259Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
260Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
261Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
262Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
263Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
264Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
265Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
266Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
267Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
268Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
269Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
270Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
271Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
272Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
273Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
274Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
275Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
276Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
277Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
278Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
279Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
280Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
281Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
282Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
283Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
284Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
285Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
286Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
287Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
288Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
289Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
290Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
291Error relocating /k8s-for-beginners: reflect..reflect.rtype..d: symbol not found
292Error relocating /k8s-for-beginners: type...1net.IPAddr: symbol not found
293Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
294Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
295Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
296Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
297Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
298Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
299Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
300Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
301Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
302Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
303Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
304Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
305Error relocating /k8s-for-beginners: net.IPAddr..d: symbol not found
306Error relocating /k8s-for-beginners: runtime.main: symbol not found
307Error relocating /k8s-for-beginners: runtime_iscgo: symbol not found
308Error relocating /k8s-for-beginners: runtime_isstarted: symbol not found
309Error relocating /k8s-for-beginners: runtime_isarchive: symbol not found
310Error relocating /k8s-for-beginners: __gcc_personality_v0: symbol not found
311Error relocating /k8s-for-beginners: io.Writer..d: symbol not found
312Error relocating /k8s-for-beginners: runtime.writeBarrier: symbol not found
313
314FROM golang:1.17 as builder
315
316# first (build) stage
317
318WORKDIR /app
319COPY . .
320RUN go mod download
321RUN CGO_ENABLED=0 go build -o k8s-for-beginners
322
323# final (target) stage
324
325FROM alpine:3.10
326COPY --from=builder /app/k8s-for-beginners /
327CMD ["/k8s-for-beginners"]
328go mod init k8sapp # creates a `go.mod`
329
or you can create go.mod
manually:
1CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2ae327a2bdba3 k8s-for-beginners:v0.0.1 "/k8s-for-beginners" 11 seconds ago Exited (1) 10 seconds ago focused_booth
3standard_init_linux.go:228: exec user process caused: no such file or directory
4FROM alpine:3.10
5COPY k8s-for-beginners /
6CMD ["/k8s-for-beginners"]
7package main
8
9import (
10 "fmt"
11 "log"
12 "net/http"
13)
14
15func main() {
16 http.HandleFunc("/", handler)
17 log.Fatal(http.ListenAndServe("0.0.0.0:8080", nil))
18}
19
20func handler(w http.ResponseWriter, r *http.Request) {
21 log.Printf("Ping from %s", r.RemoteAddr)
22 fmt.Fprintln(w, "Hello Kubernetes Beginners!")
23}
24CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o k8s-for-beginners
25sudo docker build -t k8s-for-beginners:v0.0.1 .
26sudo docker run -p 8080:8080 -d k8s-for-beginners:v0.0.1
27 /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
28 libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f9ab5778000)
29Error loading shared library libgo.so.16: No such file or directory (needed by /k8s-for-beginners)
30Error loading shared library libgcc_s.so.1: No such file or directory (needed by /k8s-for-beginners)
31Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /k8s-for-beginners)
32Error relocating /k8s-for-beginners: crypto..z2frsa..import: symbol not found
33Error relocating /k8s-for-beginners: crypto..z2fx509..import: symbol not found
34Error relocating /k8s-for-beginners: log..import: symbol not found
35Error relocating /k8s-for-beginners: crypto..z2fmd5..import: symbol not found
36Error relocating /k8s-for-beginners: crypto..import: symbol not found
37Error relocating /k8s-for-beginners: bytes..import: symbol not found
38Error relocating /k8s-for-beginners: fmt.Fprintln: symbol not found
39Error relocating /k8s-for-beginners: crypto..z2felliptic..import: symbol not found
40Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..import: symbol not found
41Error relocating /k8s-for-beginners: crypto..z2frand..import: symbol not found
42Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..import: symbol not found
43Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..import: symbol not found
44Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..import: symbol not found
45Error relocating /k8s-for-beginners: internal..z2foserror..import: symbol not found
46Error relocating /k8s-for-beginners: crypto..z2fecdsa..import: symbol not found
47Error relocating /k8s-for-beginners: net..z2fhttp.HandleFunc: symbol not found
48Error relocating /k8s-for-beginners: io..import: symbol not found
49Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..import: symbol not found
50Error relocating /k8s-for-beginners: crypto..z2fcipher..import: symbol not found
51Error relocating /k8s-for-beginners: log.Fatal: symbol not found
52Error relocating /k8s-for-beginners: math..z2fbig..import: symbol not found
53Error relocating /k8s-for-beginners: runtime..import: symbol not found
54Error relocating /k8s-for-beginners: net..z2fhttp..import: symbol not found
55Error relocating /k8s-for-beginners: hash..z2fcrc32..import: symbol not found
56Error relocating /k8s-for-beginners: net..z2fhttp.ListenAndServe: symbol not found
57Error relocating /k8s-for-beginners: context..import: symbol not found
58Error relocating /k8s-for-beginners: fmt..import: symbol not found
59Error relocating /k8s-for-beginners: crypto..z2ftls..import: symbol not found
60Error relocating /k8s-for-beginners: errors..import: symbol not found
61Error relocating /k8s-for-beginners: internal..z2ftestlog..import: symbol not found
62Error relocating /k8s-for-beginners: runtime.setIsCgo: symbol not found
63Error relocating /k8s-for-beginners: runtime_m: symbol not found
64Error relocating /k8s-for-beginners: encoding..z2fhex..import: symbol not found
65Error relocating /k8s-for-beginners: mime..import: symbol not found
66Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..import: symbol not found
67Error relocating /k8s-for-beginners: internal..z2freflectlite..import: symbol not found
68Error relocating /k8s-for-beginners: compress..z2fgzip..import: symbol not found
69Error relocating /k8s-for-beginners: sync..import: symbol not found
70Error relocating /k8s-for-beginners: compress..z2fflate..import: symbol not found
71Error relocating /k8s-for-beginners: encoding..z2fbinary..import: symbol not found
72Error relocating /k8s-for-beginners: math..z2frand..import: symbol not found
73Error relocating /k8s-for-beginners: runtime_cpuinit: symbol not found
74Error relocating /k8s-for-beginners: internal..z2fpoll..import: symbol not found
75Error relocating /k8s-for-beginners: mime..z2fmultipart..import: symbol not found
76Error relocating /k8s-for-beginners: runtime.check: symbol not found
77Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..import: symbol not found
78Error relocating /k8s-for-beginners: crypto..z2fsha512..import: symbol not found
79Error relocating /k8s-for-beginners: runtime.registerTypeDescriptors: symbol not found
80Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..import: symbol not found
81Error relocating /k8s-for-beginners: runtime.setmodinfo: symbol not found
82Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..import: symbol not found
83Error relocating /k8s-for-beginners: time..import: symbol not found
84Error relocating /k8s-for-beginners: encoding..z2fbase64..import: symbol not found
85Error relocating /k8s-for-beginners: crypto..z2fsha256..import: symbol not found
86Error relocating /k8s-for-beginners: __go_go: symbol not found
87Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..import: symbol not found
88Error relocating /k8s-for-beginners: path..z2ffilepath..import: symbol not found
89Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..import: symbol not found
90Error relocating /k8s-for-beginners: os..import: symbol not found
91Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..import: symbol not found
92Error relocating /k8s-for-beginners: net..z2ftextproto..import: symbol not found
93Error relocating /k8s-for-beginners: encoding..z2fasn1..import: symbol not found
94Error relocating /k8s-for-beginners: runtime.requireitab: symbol not found
95Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..import: symbol not found
96Error relocating /k8s-for-beginners: path..import: symbol not found
97Error relocating /k8s-for-beginners: io..z2fioutil..import: symbol not found
98Error relocating /k8s-for-beginners: sort..import: symbol not found
99Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..import: symbol not found
100Error relocating /k8s-for-beginners: internal..z2fcpu..import: symbol not found
101Error relocating /k8s-for-beginners: runtime.ginit: symbol not found
102Error relocating /k8s-for-beginners: runtime.osinit: symbol not found
103Error relocating /k8s-for-beginners: runtime.schedinit: symbol not found
104Error relocating /k8s-for-beginners: bufio..import: symbol not found
105Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..import: symbol not found
106Error relocating /k8s-for-beginners: runtime_mstart: symbol not found
107Error relocating /k8s-for-beginners: net..import: symbol not found
108Error relocating /k8s-for-beginners: strconv..import: symbol not found
109Error relocating /k8s-for-beginners: runtime.args: symbol not found
110Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..import: symbol not found
111Error relocating /k8s-for-beginners: runtime.newobject: symbol not found
112Error relocating /k8s-for-beginners: syscall..import: symbol not found
113Error relocating /k8s-for-beginners: unicode..import: symbol not found
114Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..import: symbol not found
115Error relocating /k8s-for-beginners: encoding..z2fpem..import: symbol not found
116Error relocating /k8s-for-beginners: _Unwind_Resume: symbol not found
117Error relocating /k8s-for-beginners: reflect..import: symbol not found
118Error relocating /k8s-for-beginners: mime..z2fquotedprintable..import: symbol not found
119Error relocating /k8s-for-beginners: log.Printf: symbol not found
120Error relocating /k8s-for-beginners: runtime.typedmemmove: symbol not found
121Error relocating /k8s-for-beginners: crypto..z2fdsa..import: symbol not found
122Error relocating /k8s-for-beginners: crypto..z2fsha1..import: symbol not found
123Error relocating /k8s-for-beginners: bufio..types: symbol not found
124Error relocating /k8s-for-beginners: bytes..types: symbol not found
125Error relocating /k8s-for-beginners: compress..z2fflate..types: symbol not found
126Error relocating /k8s-for-beginners: compress..z2fgzip..types: symbol not found
127Error relocating /k8s-for-beginners: context..types: symbol not found
128Error relocating /k8s-for-beginners: crypto..types: symbol not found
129Error relocating /k8s-for-beginners: crypto..z2fcipher..types: symbol not found
130Error relocating /k8s-for-beginners: crypto..z2fdsa..types: symbol not found
131Error relocating /k8s-for-beginners: crypto..z2fecdsa..types: symbol not found
132Error relocating /k8s-for-beginners: crypto..z2felliptic..types: symbol not found
133Error relocating /k8s-for-beginners: crypto..z2finternal..z2frandutil..types: symbol not found
134Error relocating /k8s-for-beginners: crypto..z2fmd5..types: symbol not found
135Error relocating /k8s-for-beginners: crypto..z2frand..types: symbol not found
136Error relocating /k8s-for-beginners: crypto..z2frsa..types: symbol not found
137Error relocating /k8s-for-beginners: crypto..z2fsha1..types: symbol not found
138Error relocating /k8s-for-beginners: crypto..z2fsha256..types: symbol not found
139Error relocating /k8s-for-beginners: crypto..z2fsha512..types: symbol not found
140Error relocating /k8s-for-beginners: crypto..z2ftls..types: symbol not found
141Error relocating /k8s-for-beginners: crypto..z2fx509..types: symbol not found
142Error relocating /k8s-for-beginners: crypto..z2fx509..z2fpkix..types: symbol not found
143Error relocating /k8s-for-beginners: encoding..z2fasn1..types: symbol not found
144Error relocating /k8s-for-beginners: encoding..z2fbase64..types: symbol not found
145Error relocating /k8s-for-beginners: encoding..z2fbinary..types: symbol not found
146Error relocating /k8s-for-beginners: encoding..z2fhex..types: symbol not found
147Error relocating /k8s-for-beginners: encoding..z2fpem..types: symbol not found
148Error relocating /k8s-for-beginners: errors..types: symbol not found
149Error relocating /k8s-for-beginners: fmt..types: symbol not found
150Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20..types: symbol not found
151Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fchacha20poly1305..types: symbol not found
152Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..types: symbol not found
153Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcurve25519..types: symbol not found
154Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fdns..z2fdnsmessage..types: symbol not found
155Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpguts..types: symbol not found
156Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp..z2fhttpproxy..types: symbol not found
157Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fhttp2..z2fhpack..types: symbol not found
158Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fnet..z2fidna..types: symbol not found
159Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2fsecure..z2fbidirule..types: symbol not found
160Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2ftransform..types: symbol not found
161Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fbidi..types: symbol not found
162Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2ftext..z2funicode..z2fnorm..types: symbol not found
163Error relocating /k8s-for-beginners: hash..z2fcrc32..types: symbol not found
164Error relocating /k8s-for-beginners: internal..z2fcpu..types: symbol not found
165Error relocating /k8s-for-beginners: internal..z2foserror..types: symbol not found
166Error relocating /k8s-for-beginners: internal..z2fpoll..types: symbol not found
167Error relocating /k8s-for-beginners: internal..z2freflectlite..types: symbol not found
168Error relocating /k8s-for-beginners: internal..z2ftestlog..types: symbol not found
169Error relocating /k8s-for-beginners: io..types: symbol not found
170Error relocating /k8s-for-beginners: io..z2fioutil..types: symbol not found
171Error relocating /k8s-for-beginners: log..types: symbol not found
172Error relocating /k8s-for-beginners: math..z2fbig..types: symbol not found
173Error relocating /k8s-for-beginners: math..z2frand..types: symbol not found
174Error relocating /k8s-for-beginners: mime..types: symbol not found
175Error relocating /k8s-for-beginners: mime..z2fmultipart..types: symbol not found
176Error relocating /k8s-for-beginners: mime..z2fquotedprintable..types: symbol not found
177Error relocating /k8s-for-beginners: net..types: symbol not found
178Error relocating /k8s-for-beginners: net..z2fhttp..types: symbol not found
179Error relocating /k8s-for-beginners: net..z2fhttp..z2finternal..types: symbol not found
180Error relocating /k8s-for-beginners: net..z2ftextproto..types: symbol not found
181Error relocating /k8s-for-beginners: os..types: symbol not found
182Error relocating /k8s-for-beginners: path..types: symbol not found
183Error relocating /k8s-for-beginners: path..z2ffilepath..types: symbol not found
184Error relocating /k8s-for-beginners: reflect..types: symbol not found
185Error relocating /k8s-for-beginners: runtime..types: symbol not found
186Error relocating /k8s-for-beginners: runtime..z2finternal..z2fsys..types: symbol not found
187Error relocating /k8s-for-beginners: sort..types: symbol not found
188Error relocating /k8s-for-beginners: strconv..types: symbol not found
189Error relocating /k8s-for-beginners: sync..types: symbol not found
190Error relocating /k8s-for-beginners: syscall..types: symbol not found
191Error relocating /k8s-for-beginners: time..types: symbol not found
192Error relocating /k8s-for-beginners: unicode..types: symbol not found
193Error relocating /k8s-for-beginners: container..z2flist..types: symbol not found
194Error relocating /k8s-for-beginners: crypto..z2faes..types: symbol not found
195Error relocating /k8s-for-beginners: crypto..z2fdes..types: symbol not found
196Error relocating /k8s-for-beginners: crypto..z2fed25519..types: symbol not found
197Error relocating /k8s-for-beginners: crypto..z2fed25519..z2finternal..z2fedwards25519..types: symbol not found
198Error relocating /k8s-for-beginners: crypto..z2fhmac..types: symbol not found
199Error relocating /k8s-for-beginners: crypto..z2finternal..z2fsubtle..types: symbol not found
200Error relocating /k8s-for-beginners: crypto..z2frc4..types: symbol not found
201Error relocating /k8s-for-beginners: crypto..z2fsubtle..types: symbol not found
202Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fcryptobyte..z2fasn1..types: symbol not found
203Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fhkdf..types: symbol not found
204Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2finternal..z2fsubtle..types: symbol not found
205Error relocating /k8s-for-beginners: golang.x2eorg..z2fx..z2fcrypto..z2fpoly1305..types: symbol not found
206Error relocating /k8s-for-beginners: hash..types: symbol not found
207Error relocating /k8s-for-beginners: internal..z2fbytealg..types: symbol not found
208Error relocating /k8s-for-beginners: internal..z2ffmtsort..types: symbol not found
209Error relocating /k8s-for-beginners: internal..z2fnettrace..types: symbol not found
210Error relocating /k8s-for-beginners: internal..z2frace..types: symbol not found
211Error relocating /k8s-for-beginners: internal..z2fsingleflight..types: symbol not found
212Error relocating /k8s-for-beginners: internal..z2fsyscall..z2fexecenv..types: symbol not found
213Error relocating /k8s-for-beginners: internal..z2fsyscall..z2funix..types: symbol not found
214Error relocating /k8s-for-beginners: math..types: symbol not found
215Error relocating /k8s-for-beginners: math..z2fbits..types: symbol not found
216Error relocating /k8s-for-beginners: net..z2fhttp..z2fhttptrace..types: symbol not found
217Error relocating /k8s-for-beginners: net..z2furl..types: symbol not found
218Error relocating /k8s-for-beginners: runtime..z2finternal..z2fatomic..types: symbol not found
219Error relocating /k8s-for-beginners: runtime..z2finternal..z2fmath..types: symbol not found
220Error relocating /k8s-for-beginners: strings..types: symbol not found
221Error relocating /k8s-for-beginners: sync..z2fatomic..types: symbol not found
222Error relocating /k8s-for-beginners: unicode..z2futf16..types: symbol not found
223Error relocating /k8s-for-beginners: unicode..z2futf8..types: symbol not found
224Error relocating /k8s-for-beginners: runtime.strequal..f: symbol not found
225Error relocating /k8s-for-beginners: runtime.memequal64..f: symbol not found
226Error relocating /k8s-for-beginners: type...1reflect.rtype: symbol not found
227Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
228Error relocating /k8s-for-beginners: reflect.rtype.Align: symbol not found
229Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
230Error relocating /k8s-for-beginners: reflect.rtype.AssignableTo: symbol not found
231Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
232Error relocating /k8s-for-beginners: reflect.rtype.Bits: symbol not found
233Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
234Error relocating /k8s-for-beginners: reflect.rtype.ChanDir: symbol not found
235Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
236Error relocating /k8s-for-beginners: reflect.rtype.Comparable: symbol not found
237Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
238Error relocating /k8s-for-beginners: reflect.rtype.ConvertibleTo: symbol not found
239Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
240Error relocating /k8s-for-beginners: reflect.rtype.Elem: symbol not found
241Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
242Error relocating /k8s-for-beginners: reflect.rtype.Field: symbol not found
243Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
244Error relocating /k8s-for-beginners: reflect.rtype.FieldAlign: symbol not found
245Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
246Error relocating /k8s-for-beginners: reflect.rtype.FieldByIndex: symbol not found
247Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
248Error relocating /k8s-for-beginners: reflect.rtype.FieldByName: symbol not found
249Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
250Error relocating /k8s-for-beginners: reflect.rtype.FieldByNameFunc: symbol not found
251Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
252Error relocating /k8s-for-beginners: reflect.rtype.Implements: symbol not found
253Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
254Error relocating /k8s-for-beginners: reflect.rtype.In: symbol not found
255Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
256Error relocating /k8s-for-beginners: reflect.rtype.IsVariadic: symbol not found
257Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
258Error relocating /k8s-for-beginners: reflect.rtype.Key: symbol not found
259Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
260Error relocating /k8s-for-beginners: reflect.rtype.Kind: symbol not found
261Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
262Error relocating /k8s-for-beginners: reflect.rtype.Len: symbol not found
263Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
264Error relocating /k8s-for-beginners: reflect.rtype.Method: symbol not found
265Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
266Error relocating /k8s-for-beginners: reflect.rtype.MethodByName: symbol not found
267Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
268Error relocating /k8s-for-beginners: reflect.rtype.Name: symbol not found
269Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
270Error relocating /k8s-for-beginners: reflect.rtype.NumField: symbol not found
271Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
272Error relocating /k8s-for-beginners: reflect.rtype.NumIn: symbol not found
273Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
274Error relocating /k8s-for-beginners: reflect.rtype.NumMethod: symbol not found
275Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
276Error relocating /k8s-for-beginners: reflect.rtype.NumOut: symbol not found
277Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
278Error relocating /k8s-for-beginners: reflect.rtype.Out: symbol not found
279Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
280Error relocating /k8s-for-beginners: reflect.rtype.PkgPath: symbol not found
281Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
282Error relocating /k8s-for-beginners: reflect.rtype.Size: symbol not found
283Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
284Error relocating /k8s-for-beginners: reflect.rtype.String: symbol not found
285Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
286Error relocating /k8s-for-beginners: reflect.rtype.common: symbol not found
287Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
288Error relocating /k8s-for-beginners: reflect.rtype.rawString: symbol not found
289Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
290Error relocating /k8s-for-beginners: reflect.rtype.uncommon..stub: symbol not found
291Error relocating /k8s-for-beginners: reflect..reflect.rtype..d: symbol not found
292Error relocating /k8s-for-beginners: type...1net.IPAddr: symbol not found
293Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
294Error relocating /k8s-for-beginners: net.IPAddr.Network: symbol not found
295Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
296Error relocating /k8s-for-beginners: net.IPAddr.String: symbol not found
297Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
298Error relocating /k8s-for-beginners: net.IPAddr.family: symbol not found
299Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
300Error relocating /k8s-for-beginners: net.IPAddr.isWildcard: symbol not found
301Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
302Error relocating /k8s-for-beginners: net.IPAddr.sockaddr: symbol not found
303Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
304Error relocating /k8s-for-beginners: net.IPAddr.toLocal: symbol not found
305Error relocating /k8s-for-beginners: net.IPAddr..d: symbol not found
306Error relocating /k8s-for-beginners: runtime.main: symbol not found
307Error relocating /k8s-for-beginners: runtime_iscgo: symbol not found
308Error relocating /k8s-for-beginners: runtime_isstarted: symbol not found
309Error relocating /k8s-for-beginners: runtime_isarchive: symbol not found
310Error relocating /k8s-for-beginners: __gcc_personality_v0: symbol not found
311Error relocating /k8s-for-beginners: io.Writer..d: symbol not found
312Error relocating /k8s-for-beginners: runtime.writeBarrier: symbol not found
313
314FROM golang:1.17 as builder
315
316# first (build) stage
317
318WORKDIR /app
319COPY . .
320RUN go mod download
321RUN CGO_ENABLED=0 go build -o k8s-for-beginners
322
323# final (target) stage
324
325FROM alpine:3.10
326COPY --from=builder /app/k8s-for-beginners /
327CMD ["/k8s-for-beginners"]
328go mod init k8sapp # creates a `go.mod`
329module k8sapp
330
331go 1.17
332
QUESTION
Create a Linux-based Docker file for .NET Framework project
Asked 2022-Jan-27 at 18:27I have an ASP.Net Framework 4.8 project. I want to create a Linux-based Docker file for this project, but I can't find a Linux-based image to use as a base image in my Docker file for .NET Framework. How can I create a Docker file for this?
ANSWER
Answered 2022-Jan-27 at 14:42.NET Framework is not cross-platform. Neither is ASP.NET itself. They do not work on Linux. So there are no Linux-based container images that would let you run .NET Framework or ASP.NET Framework.
And you can not make a custom one; .NET Framework will simply not run on Linux.
That's why Microsoft created .NET Core (and now just called .NET) and ASP.NET Core, so they would be cross-platform and you could use those on Linux, including Linux-based container images.
As suggested in some comments, you might be able to use mono. Mono is a (not really supported) implementation of .NET Framework that aims to work on Linux. It's not 100% bug for bug compatible with .NET Framework, so your application may or may not work with it.
A better, but more difficult option, would be to port your application to ASP.NET Core 6, which is supported on Linux-based containers.
QUESTION
Does docker-compose support init container?
Asked 2022-Jan-25 at 09:32init container
is a great feature in Kubernetes and I wonder whether docker-compose supports it? it allows me to run some command before launch the main application.
I come cross this PR https://github.com/docker/compose-cli/issues/1499 which mentions to support init container. But I can't find related doc in their reference.
ANSWER
Answered 2021-Dec-21 at 14:11This was a discovery for me but yes, it is now possible to use init containers with docker-compose
since version 1.29 as can be seen in the PR you linked in your question.
Meanwhile, while I write those lines, it seems that this feature has not yet found its way to the documentation
You can define a dependency on an other container with a condition being basically "when that other container has successfully finished its job". This leaves the room to define containers running any kind of script and exit when they are done before an other dependent container is launched.
To illustrate, I crafted an example with a pretty common scenario: spin up a db container, make sure the db is up and initialize its data prior to launching the application container.
Note: initializing the db (at least as far as the official mysql image is concerned) does not require an init container so this example is more an illustration than a rock solid typical workflow.
The complete example is available in a public github repo so I will only show the key points in this answer.
Let's start with the compose file
1---
2x-common-env: &cenv
3 MYSQL_ROOT_PASSWORD: totopipobingo
4
5services:
6 db:
7 image: mysql:8.0
8 command: --default-authentication-plugin=mysql_native_password
9 environment:
10 <<: *cenv
11 init-db:
12 image: mysql:8.0
13 command: /initproject.sh
14 environment:
15 <<: *cenv
16 volumes:
17 - ./initproject.sh:/initproject.sh
18 depends_on:
19 db:
20 condition: service_started
21 my_app:
22 build:
23 context: ./php
24 environment:
25 <<: *cenv
26 volumes:
27 - ./index.php:/var/www/html/index.php
28 ports:
29 - 9999:80
30 depends_on:
31 init-db:
32 condition: service_completed_successfully
33
You can see I define 3 services:
- The database which is the first to start
- The init container which starts only once db is started. This one only runs a script (see below) that will exit once everything is initialized
- The application container which will only start once the init container has successfuly done its job.
The initproject.sh
script run by the db-init
container is very basic for this demo and simply retries to connect to the db every 2 seconds until it succeeds or reaches a limit of 50 tries, then creates a db/table and insert some data:
1---
2x-common-env: &cenv
3 MYSQL_ROOT_PASSWORD: totopipobingo
4
5services:
6 db:
7 image: mysql:8.0
8 command: --default-authentication-plugin=mysql_native_password
9 environment:
10 <<: *cenv
11 init-db:
12 image: mysql:8.0
13 command: /initproject.sh
14 environment:
15 <<: *cenv
16 volumes:
17 - ./initproject.sh:/initproject.sh
18 depends_on:
19 db:
20 condition: service_started
21 my_app:
22 build:
23 context: ./php
24 environment:
25 <<: *cenv
26 volumes:
27 - ./index.php:/var/www/html/index.php
28 ports:
29 - 9999:80
30 depends_on:
31 init-db:
32 condition: service_completed_successfully
33#! /usr/bin/env bash
34
35# Test we can access the db container allowing for start
36for i in {1..50}; do mysql -u root -p${MYSQL_ROOT_PASSWORD} -h db -e "show databases" && s=0 && break || s=$? && sleep 2; done
37if [ ! $s -eq 0 ]; then exit $s; fi
38
39# Init some stuff in db before leaving the floor to the application
40mysql -u root -p${MYSQL_ROOT_PASSWORD} -h db -e "create database my_app"
41mysql -u root -p${MYSQL_ROOT_PASSWORD} -h db -e "create table my_app.test (id int unsigned not null auto_increment primary key, myval varchar(255) not null)"
42mysql -u root -p${MYSQL_ROOT_PASSWORD} -h db -e "insert into my_app.test (myval) values ('toto'), ('pipo'), ('bingo')"
43
The Dockerfile for the app container is trivial (adding a mysqli driver for php) and can be found in the example repo as well as the php script to test the init was succesful by calling http://localhost:9999
in your browser.
The interesting part is to observe what's going on when launching the service with docker-compose up -d
.
The only limit to what can be done with such a feature is probably your imagination ;) Thanks for making me discovering this.
Community Discussions contain sources that include Stack Exchange Network
Tutorials and Learning Resources in Docker
Tutorials and Learning Resources are not available at this moment for Docker