Open kylos101 opened 3 years ago
@kylos101 if there is a better supported / official image that we can switch to, let's do it. Keeping the old image doesn't really help if it is
Python 3.6 seems like a rather old release now. My Ubuntu machine has 3.8 installed.
What do you recommend @LucasRoesler?
Keeping a Debian base is better for native packages than using Alpine.
Alex
Hi @alexellis @LucasRoesler,
What do you think of this as a proposed change:
# new base image, replacing FROM armhf/python:3.6-alpine
FROM python:3.8.11-slim-buster
# Add non root user
RUN addgroup --system app
RUN APPGROUPID=$(getent group app | cut -d: -f3)
RUN adduser --system --group $APPGROUPID app
I had to add the user to the group over a series of 3 lines, instead of 1, because I needed to capture the GID.
It works on on Raspberry Pi k3s cluster. Let me know if you'd like me to submit a PR, any changes, and test on x86_64 too?
moving from apline to debian could be a breaking change for people. It is probably a good idea to stay on an alpine image
My actions before raising this issue
I'm sorry that my
faas friday
contribution is an issue, but, at least it has a workaround! :call_me_hand:The error indicates
pytest
is failing. I am sharing detailed logs below after doingfaas-cli template pull
and creating a new function to do this test.Expected Behaviour
This should should pass for a newly generated function:
Current Behaviour
The publish command fails with the following errors from Docker:
Possible Solution
I made this change to the template on my local machine, as a test, because I noticed armhf/python:3.6 is deprecated - and was pleasantly surprised
arm32v7/python:3.6-alpine
worked.Steps to Reproduce (for bugs)
faas-cli template store pull python3-http
get the python3-http templates, if you haven'tfaas-cli new testbot --lang python3-http-armhf
to build a new testbot functionfaas-cli publish -f testbot.yml --platforms linux/arm/v7
to try building itContext
I am doing development on my Raspberry Pi k3s netbooting cluster running at home, switched my images to
armhf
, and bumped into this issue.Changing the local template for
python3-http-armhf
is a good short term solution. Long term, I'm not sure if this impacts more people, and if there's something I can do to help.I'll share on Slack to see what folks are seeing. :100:
Your Environment
faas-cli version
): CLI:Gateway uri: http://127.0.0.1:8080 version: 0.20.12 sha: a6dbb4cd0285f6dbc0bc3f43f72ceacdbdf6f227
Provider name: faas-netes orchestration: kubernetes version: 0.13.4 sha: 6f34f27a2405798b5ee2846f1654bc7754991920
Client: Docker Engine - Community Version: 20.10.7 API version: 1.41 Go version: go1.13.15 Git commit: f0df350 Built: Wed Jun 2 11:56:38 2021 OS/Arch: linux/amd64 Context: default Experimental: true
Server: Docker Engine - Community Engine: Version: 20.10.7 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: b0f5bc3 Built: Wed Jun 2 11:54:50 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.6 GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d runc: Version: 1.0.0-rc95 GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7 docker-init: Version: 0.19.0 GitCommit: de40ad0
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal