OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
161 stars 20 forks source link

Octopus Deploy Docker containers do not start when using OpenShift #9091

Open liam-mackie opened 3 weeks ago

liam-mackie commented 3 weeks ago

Severity

Blocks at least one customer, workarounds available

Version

Tested using 2023.4.8338 and 2024.4.5927

Latest Version

I could reproduce the problem in the latest build

What happened?

When running Octopus Server in OpenShift using the default octopusdeploy/octopusdeploy container, the following error occurs:

Error: container create failed: time="2024-10-14T16:21:19Z" level=error msg="runc create failed: unable to start container process: exec: \"./install.sh\": permission denied"

Reproduction

Running the container in an OpenShift cluster replicates the problem. You should run in the default restricted-v2 SCC. An example deployment to replicate is this:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: octopus
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: octopus
  template:
    metadata:
      labels:
        app: octopus
    spec:
      containers:
      - name: octopus
        image: octopusdeploy/octopusdeploy:2024.3

Error and Stacktrace

No response

More Information

No response

Workaround

If you build the container yourself by using the following Dockerfile and use the resulting image, Octopus should start.

FROM octopusdeploy/octopusdeploy:<image-tag>
RUN mkdir /.octopus && \
    chgrp 0 /.octopus && \
    chmod 770 /.octopus && \
    chgrp -R 0 /opt /usr /etc/octopus /Octopus && \
    chmod -R g=u /opt /usr /etc/octopus /Octopus
RUN chgrp 0 /etc && \
    chmod g=u /etc