Container has state CrashLoopBackOff
See original GitHub issueSummary
i created a docker image using below Dockerfile
When i add it to my devfile.yaml
,i receive Container has state CrashLoopBackOff
error
FROM ubuntu:focal-20220531
LABEL authors="Divine <cdivine304@gmail.com>"
#================================================
# Customize sources for apt-get
#================================================
RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \
&& echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \
&& echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list
# No interactive frontend during docker build
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true
#========================
# Miscellaneous packages
# Includes minimal runtime used for executing non GUI Java programs
#========================
RUN apt-get -qqy update \
&& apt-get -qqy install \
bzip2 \
ca-certificates \
tzdata \
sudo \
unzip \
wget \
jq \
curl \
supervisor \
gnupg2 \
xvfb \
maven git openjdk-8-jdk \
&& update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
#===================
# Timezone settings
# Possible alternative: https://github.com/docker/docker/issues/3359#issuecomment-32150214
#===================
ENV TZ "UTC"
RUN echo "${TZ}" > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata
ENTRYPOINT ["/bin/bash"]
i linked the above dockerimage in below devfile.yaml
schemaVersion: 2.1.0
metadata:
name: cbfsel-repo
projects:
- name: cbfsel-project
git:
checkoutFrom:
revision: master
remotes:
origin: https://gitlab.eng.com/dchelladurai/cbf-sel.git
components:
- container:
image: 'artfact-prd.com/qedocker/eclipseche/customopenjdk8:v2'
memoryLimit: 4G
volumeMounts:
- name: m2volume
path: /home/user/.m2
name: javacontainer
- name: m2volume
volume:
size: 4G
commands:
- exec:
commandLine: mvn clean package -DskipTests
component: javacontainer
group:
isDefault: true
kind: build
label: 'build project using maven'
workingDir: '${PROJECT_SOURCE}'
id: mvnpackage
please let me know how to fix this error
Relevant information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Understanding Kubernetes CrashLoopBackoff Events
CrashLoopBackOff is a status message that indicates one of your pods is in a constant state of flux—one or more containers are failing...
Read more >Kubernetes CrashLoopBackOff Error: What It Is and How to Fix It
CrashLoopBackOff is a common Kubernetes error, which indicates that a pod failed to start, Kubernetes tried to restart it, and it continued to...
Read more >Troubleshoot and Fix Kubernetes CrashLoopBackoff Status
The CrashLoopBackoff status is a notification that the pod is being restarted due to an error and is waiting for the specified 'backoff'...
Read more >My kubernetes pods keep crashing with "CrashLoopBackOff ...
The pod is crashing because it starts up then immediately exits, thus Kubernetes restarts and the cycle continues. Share.
Read more >Kubernetes - How to Debug CrashLoopBackOff in a Container
A CrashLoopBackOff is possible for several types of k8s misconfigurations (not able ... CrashLoopBackOff Last State: Terminated Reason: ContainerCannotRun ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I might mistaken but Dockerfile should look like below, to never stop
@amisevsk
i updated the
Dockerfile
as per your suggestion. Now the container is loaded byeclipse-che
workspace successfully. i have attached the details below. Thank you for the inputs.Dockerfile
entrypoint.sh
is copied from heredevfile.yaml