adhocore / docker-lemp

A single container LEMP complete fullstack with latest release of PHP8.0.30/8.1.29/8.2.23/8.3.11, MySQL, nginx, PostgreSQL, mailcatcher, beanstalkd, elasticsearch, memcached, redis, adminer and all you ever need; on top alpine3.17+ for both arm and amd arch
https://hub.docker.com/r/adhocore/lemp
MIT License
153 stars 40 forks source link

Copy Application into container #31

Closed gogl92 closed 2 years ago

gogl92 commented 2 years ago

Sometimes a full containerized app needs to be created to easily ship to a service or to give to someone for testing, how to achieve this? The only way I found is to add this line to the Dockerfile:

# Copy source code
COPY --chown=www-data:www-data . /var/www/html
adhocore commented 2 years ago

yep that, or if the recipient is somewhat techie could as well send the app repo (github/bitbucket etc) and the Dockerfile or even better docker-compose.yml (with volumes preconfigured) and some instructions to run it

gogl92 commented 2 years ago

@adhocore but the other thing is I'd like to deploy this to AWS/Google cloud so it'd be easier just to create a container with the code already loaded

adhocore commented 2 years ago

yes then COPY in Dockerfile