-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't run docker on OpenShift #1134
Comments
Any information regarding it? I'm happy to contribute if we go this route. |
we struggled also but came up with that solution: kind: Deployment
apiVersion: apps/v1
metadata:
name: ittools
labels:
app: ittools
spec:
strategy:
type: Recreate
replicas: 1
selector:
matchLabels:
app: ittools
template:
metadata:
labels:
app: ittools
spec:
containers:
- name: ittools
imagePullPolicy: Always
image: corentinth/it-tools:latest
ports:
- containerPort: 8080
protocol: TCP
volumeMounts:
- name: nginxconf
mountPath: /etc/nginx/conf.d/default.conf
subPath: default.conf
readOnly: true
- name: nginxconf
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
readOnly: true
- name: nginx-cache
mountPath: /var/cache/nginx
resources:
limits:
cpu: 1
memory: 1Gi
requests:
cpu: 200m
memory: 128Mi
readinessProbe:
httpGet:
path: /favicon.ico
port: 8080
scheme: HTTP
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
volumes:
- name: nginxconf
configMap:
name: nginxconf
- name: nginx-cache
emptyDir: {}
restartPolicy: Always
---
kind: ConfigMap
apiVersion: v1
metadata:
name: nginxconf
data:
default.conf: |+
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
nginx.conf: |+
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/cache/nginx/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
} good luck |
Hi @toastbrotch, @Sevenlive, @DataOps7 , solution by @ombre8 implemented in my fork, if you arr interested in up to date version of it-tools, I made kind of a fork here : https://github.com/sharevb/it-tools (https://sharevb-it-tools.vercel.app/ and docker images https://github.com/sharevb/it-tools/pkgs/container/it-tools) |
Describe the bug
Because the docker uses nginx, it's unable to run on OpenShift kubernetes.
To solve, we can use
nginxinc/nginx-unprivileged
as the Docker base image.What happened?
Got permission denied when accessing
/var/cache/nginx/client_temp
System information
not applicable
Where did you encounter the bug?
A self hosted
The text was updated successfully, but these errors were encountered: