├── Dockerfile ├── LICENSE.txt ├── README.md ├── instantclient-basic-linux.x64-12.1.0.2.0.zip ├── instantclient-sdk-linux.x64-12.1.0.2.0.zip └── instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM tutum/apache-php 2 | 3 | RUN apt-get update 4 | RUN apt-get install -y unzip libaio-dev php5-dev 5 | RUN apt-get clean -y 6 | 7 | # Oracle instantclient 8 | ADD instantclient-basic-linux.x64-12.1.0.2.0.zip /tmp/ 9 | ADD instantclient-sdk-linux.x64-12.1.0.2.0.zip /tmp/ 10 | ADD instantclient-sqlplus-linux.x64-12.1.0.2.0.zip /tmp/ 11 | 12 | RUN unzip /tmp/instantclient-basic-linux.x64-12.1.0.2.0.zip -d /usr/local/ 13 | RUN unzip /tmp/instantclient-sdk-linux.x64-12.1.0.2.0.zip -d /usr/local/ 14 | RUN unzip /tmp/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip -d /usr/local/ 15 | RUN ln -s /usr/local/instantclient_12_1 /usr/local/instantclient 16 | RUN ln -s /usr/local/instantclient/libclntsh.so.12.1 /usr/local/instantclient/libclntsh.so 17 | RUN ln -s /usr/local/instantclient/sqlplus /usr/bin/sqlplus 18 | RUN echo 'instantclient,/usr/local/instantclient' | pecl install oci8 19 | RUN echo "extension=oci8.so" > /etc/php5/apache2/conf.d/30-oci8.ini 20 | 21 | RUN echo "" > /app/index.php 22 | 23 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Oracle Technology Network Development and Distribution License Terms for 2 | Instant Client 3 | 4 | 5 | Export Controls on the Programs 6 | Selecting the "Accept License Agreement" button is a confirmation of 7 | your agreement that you comply, now and during the trial term, with each 8 | of the following statements: 9 | 10 | 11 | -You are not a citizen, national, or resident of, and are not under 12 | control of, the government of Cuba, Iran, Sudan, Libya, North Korea, 13 | Syria, nor any country to which the United States has prohibited export. 14 | -You will not download or otherwise export or re-export the Programs, 15 | directly or indirectly, to the above mentioned countries nor to 16 | citizens, nationals or residents of those countries. 17 | -You are not listed on the United States Department of Treasury lists of 18 | Specially Designated Nationals, Specially Designated Terrorists, and 19 | Specially Designated Narcotic Traffickers, nor are you listed on the 20 | United States Department of Commerce Table of Denial Orders. 21 | 22 | 23 | You will not download or otherwise export or re-export the Programs, 24 | directly or indirectly, to persons on the above mentioned lists. 25 | 26 | 27 | You will not use the Programs for, and will not allow the Programs to be 28 | used for, any purposes prohibited by United States law, including, 29 | without limitation, for the development, design, manufacture or 30 | production of nuclear, chemical or biological weapons of mass 31 | destruction. 32 | 33 | 34 | EXPORT RESTRICTIONS 35 | You agree that U.S. export control laws and other applicable export and 36 | import laws govern your use of the programs, including technical data; 37 | additional information can be found on Oracle®'s Global Trade Compliance 38 | web site (http://www.oracle.com/products/export). 39 | 40 | 41 | You agree that neither the programs nor any direct product thereof will 42 | be exported, directly, or indirectly, in violation of these laws, or 43 | will be used for any purpose prohibited by these laws including, without 44 | limitation, nuclear, chemical, or biological weapons proliferation. 45 | 46 | 47 | Oracle Employees: Under no circumstances are Oracle Employees authorized 48 | to download software for the purpose of distributing it to customers. 49 | Oracle products are available to employees for internal use or 50 | demonstration purposes only. In keeping with Oracle's trade compliance 51 | obligations under U.S. and applicable multilateral law, failure to 52 | comply with this policy could result in disciplinary action up to and 53 | including termination. 54 | 55 | 56 | Note: You are bound by the Oracle Technology Network ("OTN") License 57 | Agreement terms. The OTN License Agreement terms also apply to all 58 | updates you receive under your Technology Track subscription. 59 | 60 | 61 | The OTN License Agreement terms below supercede any shrinkwrap license 62 | on the OTN Technology Track software CDs and previous OTN License terms 63 | (including the Oracle Program License as modified by the OTN Program Use 64 | Certificate). 65 | 66 | 67 | Oracle Technology Network Development and Distribution License Agreement 68 | for Instant Client 69 | 70 | "We," "us," and "our" refers to Oracle America, Inc. "You" and "your" 71 | refers to the individual or entity that wishes to use the Programs from 72 | Oracle under this Agreement. "Programs" refers to the Software Products 73 | referenced below that you wish to download and use and Program 74 | documentation. "License" refers to your right to use the Programs and 75 | Program documentation under the terms of this Agreement. The substantive 76 | and procedural laws of California govern this Agreement. You and Oracle 77 | agree to submit to the exclusive jurisdiction of, and venue in, the 78 | courts of San Francisco, San Mateo, or Santa Clara counties in 79 | California in any dispute arising out of or relating to this Agreement. 80 | We are willing to license the Programs to you only upon the condition 81 | that you accept all of the terms contained in this Agreement. Read the 82 | terms carefully and select the "Accept" button at the bottom of the page 83 | to confirm your acceptance. If you are not willing to be bound by these 84 | terms, select the "Do Not Accept" button and the registration process 85 | will not continue. 86 | 87 | Software Product 88 | - Instant Client 89 | 90 | License Rights 91 | 92 | License. 93 | We grant you a non-exclusive right and license to use the Programs 94 | solely for your business purposes and development and testing purposes, 95 | subject to the terms of this Agreement. You may allow third parties to 96 | use the Programs, subject to the terms of this Agreement, provided such 97 | third party use is for your business operations only. 98 | 99 | Distribution License 100 | We grant you a non-exclusive right and license to distribute the 101 | Programs, provided that you do not charge your end users for use of the 102 | Programs. Your distribution of such Programs shall at a minimum include 103 | the following terms in an executed license agreement between you and the 104 | end user that: (1) restrict the use of the Programs to the business 105 | operations of the end user; (2) prohibit (a) the end user from 106 | assigning, giving, or transferring the Programs or an interest in them 107 | to another individual or entity (and if your end user grants a security 108 | interest in the Programs, the secured party has no right to use or 109 | transfer the Programs); (b) make the Programs available in any manner to 110 | any third party for use in the third party's business operations (unless 111 | such access is expressly permitted for the specific program license or 112 | materials from the services you have acquired); and (c) title to the 113 | Programs from passing to the end user or any other party; (3) prohibit 114 | the reverse engineering (unless required by law for interoperability), 115 | disassembly or decompilation of the Programs and prohibit duplication of 116 | the Programs except for a sufficient number of copies of each Program 117 | for the end user's licensed use and one copy of each Program media; (4) 118 | disclaim, to the extent permitted by applicable law, our liability for 119 | any damages, whether direct, indirect, incidental, or consequential, 120 | arising from the use of the Programs; (5) require the end user at the 121 | termination of the Agreement, to discontinue use and destroy or return 122 | to you all copies of the Programs and documentation; (6) prohibit 123 | publication of any results of benchmark tests run on the Programs; (7) 124 | require the end user to comply fully with all relevant export laws and 125 | regulations of the United States and other applicable export and import 126 | laws to assure that neither the Programs, nor any direct product 127 | thereof, are exported, directly or indirectly, in violation of 128 | applicable laws; (8) do not require us to perform any obligations or 129 | incur any liability not previously agreed to between you and us; (9) 130 | permit you to audit your end user's use of the Programs or to assign 131 | your right to audit the end user's use of the Programs to us; (10) 132 | designate us as a third party beneficiary of the end user license 133 | agreement; (11) include terms consistent with those contained in the 134 | sections of this Agreement entitled "Disclaimer of Warranties and 135 | Exclusive Remedies," "No Technical Support," "End of Agreement," 136 | "Relationship Between the Parties," and "Open Source"; and (11) exclude 137 | the application of the Uniform Computer Information Transactions Act. 138 | 139 | You may allow your end users to permit third parties to use the Programs 140 | on such end user's behalf for the purposes set forth in the end user 141 | license agreement, subject to the terms of such agreement. You shall be 142 | financially responsible for all claims and damages to us caused by your 143 | failure to include the required contractual terms set forth above in 144 | each end user license agreement between you and an end user. We are a 145 | third party beneficiary of any end user license agreement between you 146 | and the end user, but do not assume any of your obligations thereunder, 147 | and you agree that you will not enter into any end user license 148 | agreement that excludes us as a third party beneficiary and will inform 149 | your end users of our rights. 150 | 151 | If you want to use the Programs for any purpose other than as expressly 152 | permitted under this Agreement you must contact us to obtain the 153 | appropriate license. We may audit your use of the Programs. Program 154 | documentation is either shipped with the Programs, or documentation may 155 | be accessed online at 156 | http://www.oracle.com/technetwork/indexes/documentation/index.html. 157 | 158 | You agree to: (a) defend and indemnify us against all claims and damages 159 | caused by your distribution of the Programs in breach of this Agreement 160 | and/or failure to include the required contractual provisions in your 161 | end user agreement as stated above; (b) keep executed end user 162 | agreements and records of end user information including name, address, 163 | date of distribution and identity of Programs distributed; (c) allow us 164 | to inspect your end user agreements and records upon request; and, (d) 165 | enforce the terms of your end user agreements so as to effect a timely 166 | cure of any end user breach, and to notify us of any breach of the 167 | terms. 168 | 169 | Ownership and Restrictions 170 | We retain all ownership and intellectual property rights in the 171 | Programs. You may make a sufficient number of copies of the Programs for 172 | the licensed use and one copy of the Programs for backup purposes. 173 | 174 | You may not: 175 | -use the Programs for any purpose other than as provided above; 176 | -charge your end users for use of the Programs; 177 | -remove or modify any Program markings or any notice of our proprietary 178 | rights; 179 | -assign this agreement or give the Programs, Program access or an 180 | interest in the Programs to any individual or entity except as provided 181 | under this agreement; 182 | -cause or permit reverse engineering (unless required by law for 183 | interoperability), disassembly or decompilation of the Programs; 184 | -disclose results of any Program benchmark tests without our prior 185 | consent. 186 | 187 | Export 188 | You agree that U.S. export control laws and other applicable export and 189 | import laws govern your use of the Programs, including technical data; 190 | additional information can be found on Oracle's Global Trade Compliance 191 | web site located at http://www.oracle.com/products/export/index.html. 192 | You agree that neither the Programs nor any direct product thereof will 193 | be exported, directly, or indirectly, in violation of these laws, or 194 | will be used for any purpose prohibited by these laws including, without 195 | limitation, nuclear, chemical, or biological weapons proliferation. 196 | 197 | Disclaimer of Warranty and Exclusive Remedies 198 | 199 | THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. WE 200 | FURTHER DISCLAIM ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT 201 | LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 202 | PARTICULAR PURPOSE OR NONINFRINGEMENT. 203 | 204 | IN NO EVENT SHALL WE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, 205 | PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS, 206 | REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER 207 | IN AN ACTION IN CONTRACT OR TORT, EVEN IF WE HAVE BEEN ADVISED OF THE 208 | POSSIBILITY OF SUCH DAMAGES. OUR ENTIRE LIABILITY FOR DAMAGES HEREUNDER 209 | SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000). 210 | 211 | No Technical Support 212 | Our technical support organization will not provide technical support, 213 | phone support, or updates to you or end users for the Programs licensed 214 | under this agreement. 215 | 216 | Restricted Rights 217 | If you distribute a license to the United States government, the 218 | Programs, including documentation, shall be considered commercial 219 | computer software and you will place a legend, in addition to applicable 220 | copyright notices, on the documentation, and on the media label, 221 | substantially similar to the following: 222 | NOTICE OF RESTRICTED RIGHTS 223 | "Programs delivered subject to the DOD FAR Supplement are 'commercial 224 | computer software' and use, duplication, and disclosure of the programs, 225 | including documentation, shall be subject to the licensing restrictions 226 | set forth in the applicable Oracle license agreement. Otherwise, 227 | programs delivered subject to the Federal Acquisition Regulations are 228 | 'restricted computer software' and use, duplication, and disclosure of 229 | the programs, including documentation, shall be subject to the 230 | restrictions in FAR 52.227-19, Commercial Computer Software-Restricted 231 | Rights (June 1987). Oracle Corporation, 500 Oracle Parkway, Redwood 232 | City, CA 94065." 233 | 234 | End of Agreement 235 | You may terminate this Agreement by destroying all copies of the 236 | Programs. We have the right to terminate your right to use the Programs 237 | if you fail to comply with any of the terms of this Agreement, in which 238 | case you shall destroy all copies of the Programs. 239 | 240 | Relationship Between the Parties 241 | The relationship between you and us is that of licensee/licensor. 242 | Neither party will represent that it has any authority to assume or 243 | create any obligation, express or implied, on behalf of the other party, 244 | nor to represent the other party as agent, employee, franchisee, or in 245 | any other capacity. Nothing in this Agreement shall be construed to 246 | limit either party's right to independently develop or distribute 247 | software that is functionally similar to the other party's products, so 248 | long as proprietary information of the other party is not included in 249 | such software. 250 | 251 | Open Source 252 | "Open Source" software - software available without charge for use, 253 | modification and distribution - is often licensed under terms that 254 | require the user to make the user's modifications to the Open Source 255 | software or any software that the user 'combines' with the Open Source 256 | software freely available in source code form. If you use Open Source 257 | software in conjunction with the Programs, you must ensure that your use 258 | does not: (i) create, or purport to create, obligations of us with 259 | respect to the Oracle Programs; or (ii) grant, or purport to grant, to 260 | any third party any rights to or immunities under our intellectual 261 | property or proprietary rights in the Oracle Programs. For example, you 262 | may not develop a software program using an Oracle Program and an Open 263 | Source program where such use results in a program file(s) that contains 264 | code from both the Oracle Program and the Open Source program (including 265 | without limitation libraries) if the Open Source program is licensed 266 | under a license that requires any "modifications" be made freely 267 | available. You also may not combine the Oracle Program with programs 268 | licensed under the GNU General Public License ("GPL") in any manner that 269 | could cause, or could be interpreted or asserted to cause, the Oracle 270 | Program or any modifications thereto to become subject to the terms of 271 | the GPL. 272 | 273 | Entire Agreement 274 | You agree that this Agreement is the complete agreement for the Programs 275 | and licenses, and this Agreement supersedes all prior or contemporaneous 276 | Agreements or representations. If any term of this Agreement is found to 277 | be invalid or unenforceable, the remaining provisions will remain 278 | effective. 279 | 280 | Last updated: 01/24/08 281 | 282 | 283 | 284 | Should you have any questions concerning this License Agreement, or if 285 | you desire to contact Oracle for any reason, please write: 286 | Oracle America, Inc. 287 | 500 Oracle Parkway, 288 | Redwood City, CA 94065 289 | 290 | 291 | Oracle may contact you to ask if you had a satisfactory experience 292 | installing and using this OTN software download. 293 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | tutum-docker-apache-php + Oracle OCI8 drivers 2 | ============================================= 3 | 4 | Docker image based on tutum/apache-php with Oracle InstantClient OCI8 5 | driver 6 | 7 | License 8 | ------- 9 | 10 | You must accept the OTN Development and Distribution License Agreement 11 | for Instant Client to download this software. 12 | 13 | 14 | Usage 15 | ----- 16 | 17 | (See `tutum/apache-php` for more information.) 18 | 19 | Start your image binding the external ports 80 in all interfaces to your 20 | container: 21 | 22 | docker run -d -p 80:80 davidgaya/apache-php-oci 23 | 24 | Test your deployment: 25 | 26 | curl http://localhost/ 27 | 28 | Loading your custom PHP application 29 | ----------------------------------- 30 | 31 | In order to replace the "phpinfo" application that comes bundled 32 | with this docker image, 33 | create a new `Dockerfile` in an empty folder with the following 34 | contents: 35 | 36 | FROM davidgaya/apache-php-oci:latest 37 | RUN rm -fr /app && git clone https://github.com/username/customapp.git /app 38 | 39 | replacing `https://github.com/username/customapp.git` with your 40 | application's GIT repository. 41 | After that, build the new `Dockerfile`: 42 | 43 | docker build -t username/my-php-app . 44 | 45 | And test it: 46 | 47 | docker run -d -p 80:80 username/my-php-app 48 | 49 | Test your deployment: 50 | 51 | curl http://localhost/ 52 | 53 | That's it! 54 | -------------------------------------------------------------------------------- /instantclient-basic-linux.x64-12.1.0.2.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidgaya/docker-apache-php-oci/de1dfb0d82d1eb5c521fb636faf8a480709c3ea6/instantclient-basic-linux.x64-12.1.0.2.0.zip -------------------------------------------------------------------------------- /instantclient-sdk-linux.x64-12.1.0.2.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidgaya/docker-apache-php-oci/de1dfb0d82d1eb5c521fb636faf8a480709c3ea6/instantclient-sdk-linux.x64-12.1.0.2.0.zip -------------------------------------------------------------------------------- /instantclient-sqlplus-linux.x64-12.1.0.2.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidgaya/docker-apache-php-oci/de1dfb0d82d1eb5c521fb636faf8a480709c3ea6/instantclient-sqlplus-linux.x64-12.1.0.2.0.zip --------------------------------------------------------------------------------