use of bitnami codeigniter Docker container |
First let me say that I have an application up and running on AWS Lightsail that uses CI 3 and Grocery Crud and works fine. I want to ad some features that I think will help in marketing my product (which, btw, is free). When I originally wrote the CI application on my Windows PC and uploaded it to AWS, I found some parts didn't work. Through a huge amount of effort I was able to debug my server app remotely.
I have sworn that if I make any changes to the server code I need a better way to debug this than to remote debug on AWS. Thus I have decided to use Docker so I can debug directly on my Ubuntu laptop. I have pretty much standardized on Bitnami to handle the server config. Bitnami has docker development containers for CI3, mariaDB, php, and Apache. On my laptop my CI application is at /var/html/www/sub_crud. Below this is the /Application, /APPATHcache, /External Libraries directories. These are the normal CI things (and php runtime) that my app uses. My plan is to create a copy of this sub_crud directory in a new layer in the apache image. I will do this by running docker build image from the /var directory. Bitnami containers use the 4 images I talked about. In my case I will use my modified image that I call apache-with-code to start the Apache server. Since I already have the CI source and the php runtime in sub_crud that I am copying to the apache-with_code image, I am thinking that I just need to start up the following containers: apache-with-code mariaDB Will this possibly work?
proof that an old dog can learn new tricks
You will have to try it to see if it will work.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(09-29-2019, 02:46 AM)InsiteFX Wrote: You will have to try it to see if it will work.Thanks insitefx. I am just checking to see if I have entered a known dead end. Turns out that when building a layer onto an existing image, you can only copy files and dirs that are in sub dirs of the location of the Dockerfile. I finally got the updated image built last night. I had to use .dockerignore to keep the cache files out of the image. I guess I could switch the session caches to use the database instead but I don't think it needs to persist across reboots. So I got the image built. I run the new container with: richb201@richb201-XPS-13-9370:/var/www/html$ docker container run -p 80:80 --rm apache-with-code Welcome to the Bitnami apache container Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-apache Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-apache/issues nami INFO Initializing apache nami INFO apache successfully initialized INFO ==> Starting apache... [Sun Sep 29 12:01:00.588207 2019] [ssl:warn] [pid 35] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name [Sun Sep 29 12:01:00.593816 2019] [ssl:warn] [pid 35] AH01909: www.example.com:8443:0 server certificate does NOT include an ID which matches the server name [Sun Sep 29 12:01:00.594966 2019] [mpm_prefork:notice] [pid 35] AH00163: Apache/2.4.41 (Unix) OpenSSL/1.1.0k configured -- resuming normal operations [Sun Sep 29 12:01:00.594989 2019] [core:notice] [pid 35] AH00094: Command line: 'httpd -f /opt/bitnami/apache/conf/httpd.conf -D FOREGROUND' Now I go over to my browser and type localhost. Here is what I get: [color=var(--google-gray-900)]This site can’t be reached[/color] The connection was reset. I also tried http://localhost/sub_crud:80 with the same results. Anyone know what youwould try next?
proof that an old dog can learn new tricks
|
Welcome Guest, Not a member yet? Register Sign In |