Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM php:7.0-apache | ||
|
||
# Install Node | ||
RUN NODE_VERSION=$(curl https://semver.io/node/stable) \ | ||
&& NPM_VERSION=$(curl https://semver.io/npm/stable) \ | ||
&& curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ | ||
&& tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | ||
&& rm "node-v$NODE_VERSION-linux-x64.tar.gz" \ | ||
&& npm install -g npm@"$NPM_VERSION" \ | ||
&& npm cache clear | ||
|
||
# Install Git | ||
RUN apt-get clean && apt-get update && apt-get install --fix-missing -y git | ||
|
||
# Copy source | ||
RUN mkdir -p /tmp | ||
WORKDIR /tmp | ||
COPY . ./ | ||
|
||
# Install dependencies | ||
RUN npm install -g gulp && npm install --save-dev jshint gulp-jshint && npm install | ||
|
||
# Build and move main application | ||
RUN gulp clean --silent && gulp init && \ | ||
mv build/* /var/www/html/ && \ | ||
mv /var/www/html/root.htaccess /var/www/html/.htaccess && \ | ||
rm -rf /tmp | ||
|
||
# Install Apache and PHP extensions | ||
RUN a2enmod rewrite && \ | ||
docker-php-ext-install gettext | ||
|
||
VOLUME /var/www/html/_public | ||
|
||
EXPOSE 80 |