• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Coldfusion Google Cloud Docker Container .car settings file not loading

New Here ,
Jun 28, 2024 Jun 28, 2024

Copy link to clipboard

Copied

I am trying to create a Coldfusion Docker image to run as a container that is created using Google Cloud Build and Google Cloud Run.

Currently I have everything working correctly. My problem is that the .car and the mysql.jar files are not being copied, so when the Docker image is built (Google Cloud Build) there are no Coldfusion Datasources or settings. Security of these settings is very important and thus I am not inclined to use a setting.json file for importing settings.

I have also tried building the file locally and pushing it to the Google Artifact Registry and using that image. That image had the same issue when I run it.

Here is the Log from Google Cloud Run:
```
Starting ColdFusion
Starting ColdFusion 2021 server ...
session): Could not set limit for 'locks' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'sigpending' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'msgqueue' to soft=819200, hard=819200: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'nice' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'rtprio' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'UNKNOWN' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
session): session opened for user cfuser(uid=999) by (uid=0)
session): session closed for user cfuser
Default STARTUP TCP probe succeeded after 1 attempt for container "cf-server-1" on port 8500.
Cloud Run v1 xxxv {@type: type.googleapis.com/google.cloud.audit.AuditLog, methodName: v1, resourceName: namespaces/xxx/revisions/xxx, response: {…}, serviceName: run.googleapis.com, status: {…}}
Cloud Run v1 xxxv {@type: type.googleapis.com/google.cloud.audit.AuditLog, methodName: v1, resourceName: namespaces/xxx/revisions/xxx, response: {…}, serviceName: run.googleapis.com, status: {…}}
Cloud Run v1 xxx-cf-server {@type: type.googleapis.com/google.cloud.audit.AuditLog, methodName: v1, resourceName: namespaces/xxx-cf-server, response: {…}, serviceName: run.googleapis.com, status: {…}}
======================================================================
ColdFusion 2021 server has been started.
ColdFusion 2021 will write logs to /opt/coldfusion/cfusion/bin/../logs/coldfusion-out.log
2024-06-28 12:51:41.410 EST
======================================================================
session): Could not set limit for 'locks' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'sigpending' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'msgqueue' to soft=819200, hard=819200: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'nice' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'rtprio' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'UNKNOWN' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
session): session opened for user cfuser(uid=999) by (uid=0)
session): session closed for user cfuser
[] Checking server startup status...
session): Could not set limit for 'locks' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'sigpending' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'msgqueue' to soft=819200, hard=819200: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'nice' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'rtprio' to soft=0, hard=0: Operation not permitted; uid=0,euid=0
session): Could not set limit for 'UNKNOWN' to soft=-1, hard=-1: Operation not permitted; uid=0,euid=0
session): session opened for user cfuser(uid=999) by (uid=0)
session): session closed for user cfuser
[] Checking server startup status...
...
CONTINUES REPEATING
```


Here is the DockerFile:
```
# Use the official ColdFusion Docker image as the base image
FROM adobecoldfusion/coldfusion:latest-2021
# Set the working directory
WORKDIR /app
#Set the environment variables
ENV DOCKER_BUILDKIT=1 # not sure if this works?
ENV acceptEULA=YES
ENV password=123
ENV installModules=mysql,mail,saml
ENV PORT=8500
# Copy the cf-application files to the container
COPY . /app
COPY ./_data /data
COPY ./lib/mysql-connector-j-8.2.0.jar /opt/coldfusion/cfusion/lib/mysql-connector-j-8.2.0.jar

EXPOSE 8500
```

Here is the Cloud Build file (cfapp.cloudbuild.yaml)
```
steps:
- name: "gcr.io/cloud-builders/docker"
args: [
# Build the Docker image
"build", "-t",
# Tag the image for Google Container Registry
"us-east1-docker.pkg.dev/$PROJECT_ID/xxx-cf-server/cf-server",
# Pass the build argument
"--build-arg", "acceptEULA=YES",
# Specify the build context (directory containing the Dockerfile)
"./coldfusion"
]

# Push the Docker image to Google Artrifact Registry
- name: "gcr.io/cloud-builders/docker"
args: ["push", "us-east1-docker.pkg.dev/$PROJECT_ID/xxx-cf-server/cf-server"]

# Deploy to Cloud Run
- name: "gcr.io/google.com/cloudsdktool/cloud-sdk"
entrypoint: gcloud
args:
- run
- deploy
- xxx-cf-server
- --image
- "us-east1-docker.pkg.dev/$PROJECT_ID/xxx-cf-server/cf-server"
- --platform
- managed
- --region
- us-east1
- --allow-unauthenticated
options:
logging: CLOUD_LOGGING_ONLY # For cloud logging only
```

When I run the following locally using a docker_compose.yaml it all runs fine.
Here is the the local docker_compose.yaml
```
version: "3.8"
services:
coldfusion:
container_name: Coldfusion
image: adobecoldfusion/coldfusion2021:latest
ports:
- "8500:8500"
environment:
- DOCKER_BUILDKIT=1
- acceptEULA=YES
- password=123
- installModules=mysql,mail,saml,debugger
- PORT=8500
volumes:
- ./coldfusion:/app
- ./coldfusion/_data:/data
- ./coldfusion/lib/mysql-connector-j-8.2.0.jar:/opt/coldfusion/cfusion/lib/mysql-connector-j-8.2.0.jar
```

Here is the directory stucture:
```/coldfusion
/_data
/settings.car
/lib
/mysql-connector-j-8.2.0.jar
```


I'm not sure if it's a permission issue? I think maybe it's never finishing the load? I'm stumped.

Any help would be greatly appreciated! TIA

TOPICS
Advanced techniques

Views

100

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation