Skip to content

Commit f3a241a

Browse files
authored
Merge pull request #387 from jolelievre/release-817
Release 817 and add docker compose to run the script locally
2 parents fd13531 + 72d5a92 commit f3a241a

File tree

16 files changed

+178
-2
lines changed

16 files changed

+178
-2
lines changed

.docker/generate-docker.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
3+
BASEDIR=$(dirname "$0")
4+
5+
$BASEDIR/install-environment.sh
6+
7+
echo Generate PrestaShop docker base files
8+
cd $BASEDIR/..
9+
python3 prestashop_docker.py generate

.docker/install-environment.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
BASEDIR=$(dirname "$0")
4+
5+
echo Install python and pip
6+
apt update
7+
apt-get install -y python3-pip
8+
9+
cd $BASEDIR/..
10+
requirements=`cat requirements.txt`
11+
for requirement in $requirements; do
12+
echo Install $requirement
13+
pip3 install $requirement --break-system-packages
14+
done

HOW-TO-USE.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It requires Python 3.6+.
66
## Installation
77

88
```bash
9-
$ pip install -r requirements.txt
9+
$ pip install -r requirements.txt --break-system-packages
1010
```
1111

1212
## Usage
@@ -60,3 +60,13 @@ positional arguments:
6060
optional arguments:
6161
-h, --help show this help message and exit
6262
```
63+
64+
## Using docker compose
65+
66+
To generate the new base files, you need to update the `versions.py` file, add a section ith your new version along with the associated PHP versions, then run
67+
68+
```php
69+
docker compose up generate
70+
```
71+
72+
This will create new folders for the new version you just added.

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
generate:
3+
image: ubuntu:latest
4+
volumes:
5+
- .:/prestashop-docker
6+
command: ["/prestashop-docker/.docker/generate-docker.sh"]

images/8.1.7/7.2-apache/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM prestashop/base:7.2-apache
2+
LABEL maintainer="PrestaShop Core Team <[email protected]>"
3+
4+
ENV PS_VERSION 8.1.7
5+
6+
# Get PrestaShop
7+
ADD https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip /tmp/prestashop.zip
8+
9+
# Extract
10+
RUN mkdir -p /tmp/data-ps \
11+
&& unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ \
12+
&& bash /tmp/ps-extractor.sh /tmp/data-ps \
13+
&& rm /tmp/prestashop.zip

images/8.1.7/7.2-fpm/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM prestashop/base:7.2-fpm
2+
LABEL maintainer="PrestaShop Core Team <[email protected]>"
3+
4+
ENV PS_VERSION 8.1.7
5+
6+
# Get PrestaShop
7+
ADD https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip /tmp/prestashop.zip
8+
9+
# Extract
10+
RUN mkdir -p /tmp/data-ps \
11+
&& unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ \
12+
&& bash /tmp/ps-extractor.sh /tmp/data-ps \
13+
&& rm /tmp/prestashop.zip

images/8.1.7/7.3-apache/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM prestashop/base:7.3-apache
2+
LABEL maintainer="PrestaShop Core Team <[email protected]>"
3+
4+
ENV PS_VERSION 8.1.7
5+
6+
# Get PrestaShop
7+
ADD https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip /tmp/prestashop.zip
8+
9+
# Extract
10+
RUN mkdir -p /tmp/data-ps \
11+
&& unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ \
12+
&& bash /tmp/ps-extractor.sh /tmp/data-ps \
13+
&& rm /tmp/prestashop.zip

images/8.1.7/7.3-fpm/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM prestashop/base:7.3-fpm
2+
LABEL maintainer="PrestaShop Core Team <[email protected]>"
3+
4+
ENV PS_VERSION 8.1.7
5+
6+
# Get PrestaShop
7+
ADD https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip /tmp/prestashop.zip
8+
9+
# Extract
10+
RUN mkdir -p /tmp/data-ps \
11+
&& unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ \
12+
&& bash /tmp/ps-extractor.sh /tmp/data-ps \
13+
&& rm /tmp/prestashop.zip

images/8.1.7/7.4-apache/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM prestashop/base:7.4-apache
2+
LABEL maintainer="PrestaShop Core Team <[email protected]>"
3+
4+
ENV PS_VERSION 8.1.7
5+
6+
# Get PrestaShop
7+
ADD https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip /tmp/prestashop.zip
8+
9+
# Extract
10+
RUN mkdir -p /tmp/data-ps \
11+
&& unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ \
12+
&& bash /tmp/ps-extractor.sh /tmp/data-ps \
13+
&& rm /tmp/prestashop.zip

images/8.1.7/7.4-fpm/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM prestashop/base:7.4-fpm
2+
LABEL maintainer="PrestaShop Core Team <[email protected]>"
3+
4+
ENV PS_VERSION 8.1.7
5+
6+
# Get PrestaShop
7+
ADD https://github.com/PrestaShop/PrestaShop/releases/download/8.1.7/prestashop_8.1.7.zip /tmp/prestashop.zip
8+
9+
# Extract
10+
RUN mkdir -p /tmp/data-ps \
11+
&& unzip -q /tmp/prestashop.zip -d /tmp/data-ps/ \
12+
&& bash /tmp/ps-extractor.sh /tmp/data-ps \
13+
&& rm /tmp/prestashop.zip

0 commit comments

Comments
 (0)