Re: [pgAdmin4][Patch] Remake Docker container packaging
2018-04-04 18:22 GMT+03:00 Dave Page: > Hi > > On Wed, Apr 4, 2018 at 2:46 PM, Максим Кольцов wrote: >> >> >> So, I've fixed it. Patch attached. Now whole requirements.txt is >> installed in one step, with no left-overs and incompabilities. > > > I've committed the patch with some minor changes to avoid breaking > compatibility with the older version: > > - The default ports are 80/443 again. > - Username/password are set with PGADMIN_DEFAULT_EMAIL and > PGADMIN_DEFAULT_PASSWORD (though, I have left them without defaults). > > Thanks! Great, thank you very much! Will you update image at docker hub? > -- > Dave Page > Blog: http://pgsnake.blogspot.com > Twitter: @pgsnake > > EnterpriseDB UK: http://www.enterprisedb.com > The Enterprise PostgreSQL Company
Re: [pgAdmin4][Patch] Remake Docker container packaging
Hi On Wed, Apr 4, 2018 at 2:46 PM, Максим Кольцовwrote: > > So, I've fixed it. Patch attached. Now whole requirements.txt is > installed in one step, with no left-overs and incompabilities. I've committed the patch with some minor changes to avoid breaking compatibility with the older version: - The default ports are 80/443 again. - Username/password are set with PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD (though, I have left them without defaults). Thanks! -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: [pgAdmin4][Patch] Remake Docker container packaging
2018-04-04 14:18 GMT+03:00 Dave Page: > > > On Wed, Apr 4, 2018 at 12:16 PM, Максим Кольцов wrote: >> >> 2018-04-04 13:55 GMT+03:00 Dave Page : >> > Hi >> > >> > On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов >> > wrote: >> >> >> >> I've updated patch. Now I drop tests and regressions. >> >> >> >> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for >> >> http and 8443 for https mode. >> >> >> >> Please review. >> > >> > >> > I'm seeing the following error when building. It looks like it's caused >> > by >> > the new requirement on pycryptodome: >> >> Is this new requirement merged in master? I will rebase my patch. > > > Yes it is. > >> >> >> In future, when chaning C-extensions in requirements.txt, it's needed >> to update Dockerfile, line 43: >> pip install --no-cache-dir psycopg2 pycrypto && \ > > > Ah, OK. > >> >> >> I install build deps, build C-extensions and remove build deps in one >> RUN step in order to avoid having layer with build deps in image >> stack. > > > Makes sense. > >> >> In fact, I can merge this with installation from requirements.txt. >> There were some reasons I made it this way in the first place, but >> it's not so relevant now. >> >> Will post patch later. > > > Thanks! So, I've fixed it. Patch attached. Now whole requirements.txt is installed in one step, with no left-overs and incompabilities. >> >> >> > Running setup.py install for pycryptodome: started >> > Running setup.py install for pycryptodome: finished with status >> > 'error' >> > Complete output from command /usr/local/bin/python -u -c "import >> > setuptools, >> > >> > tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize, >> > 'open', open)(__file__);code=f.read().replace('\r\n', >> > '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record >> > /tmp/pip-4wlgoy0e-record/install-record.txt >> > --single-version-externally-managed --compile: >> > Testing support for x86intrin.h header >> > Target does not support x86intrin.h header >> > running install >> > running build >> > running build_py >> > creating build/lib.linux-x86_64-3.6 >> > creating build/lib.linux-x86_64-3.6/Crypto >> > copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto >> > creating build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/PKCS1_v1_5.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_ofb.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/ARC2.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/CAST.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_openpgp.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/ChaCha20.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_ccm.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_cbc.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_gcm.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/__init__.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/Salsa20.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/Blowfish.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/DES3.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_ctr.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/ARC4.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/PKCS1_OAEP.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_siv.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/AES.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_eax.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_ecb.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_ocb.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/DES.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > copying lib/Crypto/Cipher/_mode_cfb.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Cipher >> > creating build/lib.linux-x86_64-3.6/Crypto/Hash >> > copying lib/Crypto/Hash/SHA256.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Hash >> > copying lib/Crypto/Hash/SHAKE256.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Hash >> > copying lib/Crypto/Hash/SHA384.py -> >> > build/lib.linux-x86_64-3.6/Crypto/Hash >> > copying
Re: [pgAdmin4][Patch] Remake Docker container packaging
2018-04-04 14:16 GMT+03:00 Максим Кольцов: > 2018-04-04 13:55 GMT+03:00 Dave Page : >> Hi >> >> On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов wrote: >>> >>> I've updated patch. Now I drop tests and regressions. >>> >>> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for >>> http and 8443 for https mode. >>> >>> Please review. >> >> >> I'm seeing the following error when building. It looks like it's caused by >> the new requirement on pycryptodome: > > Is this new requirement merged in master? I will rebase my patch. > > In future, when chaning C-extensions in requirements.txt, it's needed > to update Dockerfile, line 43: > pip install --no-cache-dir psycopg2 pycrypto && \ > > I install build deps, build C-extensions and remove build deps in one > RUN step in order to avoid having layer with build deps in image > stack. > In fact, I can merge this with installation from requirements.txt. > There were some reasons I made it this way in the first place, but > it's not so relevant now. > > Will post patch later. Also, please note line 26 in Dockerfile: RUN pip install --no-cache-dir \ sphinx flask_babel flask_security flask_paranoid python-dateutil flask_sqlalchemy \ flask_gravatar simplejson Here I install packages that are imported during documentation build, to avoid installing whole load of heavy packages and C-extensions in docs-only intermediate container. So, when these deps are changed, Dockerfile should be updated as well. >> Running setup.py install for pycryptodome: started >> Running setup.py install for pycryptodome: finished with status 'error' >> Complete output from command /usr/local/bin/python -u -c "import >> setuptools, >> tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize, >> 'open', open)(__file__);code=f.read().replace('\r\n', >> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record >> /tmp/pip-4wlgoy0e-record/install-record.txt >> --single-version-externally-managed --compile: >> Testing support for x86intrin.h header >> Target does not support x86intrin.h header >> running install >> running build >> running build_py >> creating build/lib.linux-x86_64-3.6 >> creating build/lib.linux-x86_64-3.6/Crypto >> copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto >> creating build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/PKCS1_v1_5.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_ofb.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/ARC2.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/CAST.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_openpgp.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/ChaCha20.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_ccm.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_cbc.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_gcm.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/__init__.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/Salsa20.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/Blowfish.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/DES3.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_ctr.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/ARC4.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/PKCS1_OAEP.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_siv.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/AES.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_eax.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_ecb.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_ocb.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/DES.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> copying lib/Crypto/Cipher/_mode_cfb.py -> >> build/lib.linux-x86_64-3.6/Crypto/Cipher >> creating build/lib.linux-x86_64-3.6/Crypto/Hash >> copying lib/Crypto/Hash/SHA256.py -> >> build/lib.linux-x86_64-3.6/Crypto/Hash >> copying lib/Crypto/Hash/SHAKE256.py -> >> build/lib.linux-x86_64-3.6/Crypto/Hash >> copying lib/Crypto/Hash/SHA384.py -> >> build/lib.linux-x86_64-3.6/Crypto/Hash >> copying lib/Crypto/Hash/SHA224.py -> >> build/lib.linux-x86_64-3.6/Crypto/Hash >>
Re: [pgAdmin4][Patch] Remake Docker container packaging
On Wed, Apr 4, 2018 at 12:16 PM, Максим Кольцовwrote: > 2018-04-04 13:55 GMT+03:00 Dave Page : > > Hi > > > > On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов > wrote: > >> > >> I've updated patch. Now I drop tests and regressions. > >> > >> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for > >> http and 8443 for https mode. > >> > >> Please review. > > > > > > I'm seeing the following error when building. It looks like it's caused > by > > the new requirement on pycryptodome: > > Is this new requirement merged in master? I will rebase my patch. > Yes it is. > > In future, when chaning C-extensions in requirements.txt, it's needed > to update Dockerfile, line 43: > pip install --no-cache-dir psycopg2 pycrypto && \ > Ah, OK. > > I install build deps, build C-extensions and remove build deps in one > RUN step in order to avoid having layer with build deps in image > stack. > Makes sense. > In fact, I can merge this with installation from requirements.txt. > There were some reasons I made it this way in the first place, but > it's not so relevant now. > > Will post patch later. > Thanks! > > > Running setup.py install for pycryptodome: started > > Running setup.py install for pycryptodome: finished with status > 'error' > > Complete output from command /usr/local/bin/python -u -c "import > > setuptools, > > tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/ > setup.py';f=getattr(tokenize, > > 'open', open)(__file__);code=f.read().replace('\r\n', > > '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record > > /tmp/pip-4wlgoy0e-record/install-record.txt > > --single-version-externally-managed --compile: > > Testing support for x86intrin.h header > > Target does not support x86intrin.h header > > running install > > running build > > running build_py > > creating build/lib.linux-x86_64-3.6 > > creating build/lib.linux-x86_64-3.6/Crypto > > copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto > > creating build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/PKCS1_v1_5.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_ofb.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/ARC2.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/CAST.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_openpgp.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/ChaCha20.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_ccm.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_cbc.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_gcm.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/__init__.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/Salsa20.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/Blowfish.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/DES3.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_ctr.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/ARC4.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/PKCS1_OAEP.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_siv.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/AES.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_eax.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_ecb.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_ocb.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/DES.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > copying lib/Crypto/Cipher/_mode_cfb.py -> > > build/lib.linux-x86_64-3.6/Crypto/Cipher > > creating build/lib.linux-x86_64-3.6/Crypto/Hash > > copying lib/Crypto/Hash/SHA256.py -> > > build/lib.linux-x86_64-3.6/Crypto/Hash > > copying lib/Crypto/Hash/SHAKE256.py -> > > build/lib.linux-x86_64-3.6/Crypto/Hash > > copying lib/Crypto/Hash/SHA384.py -> > > build/lib.linux-x86_64-3.6/Crypto/Hash > > copying lib/Crypto/Hash/SHA224.py -> > > build/lib.linux-x86_64-3.6/Crypto/Hash > > copying lib/Crypto/Hash/__init__.py -> > > build/lib.linux-x86_64-3.6/Crypto/Hash > > copying lib/Crypto/Hash/SHAKE128.py -> > > build/lib.linux-x86_64-3.6/Crypto/Hash > > copying lib/Crypto/Hash/HMAC.py -> > > build/lib.linux-x86_64-3.6/Crypto/Hash > >
Re: [pgAdmin4][Patch] Remake Docker container packaging
2018-04-04 13:55 GMT+03:00 Dave Page: > Hi > > On Wed, Apr 4, 2018 at 9:46 AM, Максим Кольцов wrote: >> >> I've updated patch. Now I drop tests and regressions. >> >> And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for >> http and 8443 for https mode. >> >> Please review. > > > I'm seeing the following error when building. It looks like it's caused by > the new requirement on pycryptodome: Is this new requirement merged in master? I will rebase my patch. In future, when chaning C-extensions in requirements.txt, it's needed to update Dockerfile, line 43: pip install --no-cache-dir psycopg2 pycrypto && \ I install build deps, build C-extensions and remove build deps in one RUN step in order to avoid having layer with build deps in image stack. In fact, I can merge this with installation from requirements.txt. There were some reasons I made it this way in the first place, but it's not so relevant now. Will post patch later. > Running setup.py install for pycryptodome: started > Running setup.py install for pycryptodome: finished with status 'error' > Complete output from command /usr/local/bin/python -u -c "import > setuptools, > tokenize;__file__='/tmp/pip-build-mfrhme1c/pycryptodome/setup.py';f=getattr(tokenize, > 'open', open)(__file__);code=f.read().replace('\r\n', > '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record > /tmp/pip-4wlgoy0e-record/install-record.txt > --single-version-externally-managed --compile: > Testing support for x86intrin.h header > Target does not support x86intrin.h header > running install > running build > running build_py > creating build/lib.linux-x86_64-3.6 > creating build/lib.linux-x86_64-3.6/Crypto > copying lib/Crypto/__init__.py -> build/lib.linux-x86_64-3.6/Crypto > creating build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/PKCS1_v1_5.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_ofb.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/ARC2.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/CAST.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_openpgp.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/ChaCha20.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_ccm.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_cbc.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_gcm.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/__init__.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/Salsa20.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/Blowfish.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/DES3.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_ctr.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/ARC4.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/PKCS1_OAEP.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_siv.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/AES.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_eax.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_ecb.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_ocb.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/DES.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > copying lib/Crypto/Cipher/_mode_cfb.py -> > build/lib.linux-x86_64-3.6/Crypto/Cipher > creating build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/SHA256.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/SHAKE256.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/SHA384.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/SHA224.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/__init__.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/SHAKE128.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/HMAC.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/keccak.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/MD2.py -> build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/CMAC.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/SHA3_384.py -> > build/lib.linux-x86_64-3.6/Crypto/Hash > copying lib/Crypto/Hash/SHA3_256.py
Re: [pgAdmin4][Patch] Remake Docker container packaging
пн, 2 апр. 2018 г., 7:54 Murtuza Zabuawala < murtuza.zabuaw...@enterprisedb.com>: > Hello, > > I tested the patch and it is working fine. > > - I had clean system before but after running DockerBuild, I can see 3 > different images of pgAdmin4, Is this expected? > Yes, this is expected and is the same for old docker image. Two unnamed images are temporary images from build process and can be safely removed, if you don't want cache for next builds. > - We can remove /tests/ folder from each folders, we can also remove > /web/regression/ folder from the container, they are used to run tests. > We don't require them on production code. > Sounds reasonable. In fact, I believe I did that when making a prototype, but forgot to replicate in this patch. Will do. - Can we make the ports configurable? > https://redmine.postgresql.org/issues/2997 > This is certainly doable. Please note, by the way, that pgadmin is now started on port 8080 or 8443 by default. - Allow user to choose whether to run it as Single user mode(SERVER_MODE = > False) or Multiuser mode(SERVER_MODE = True) > > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > On Sat, Mar 31, 2018 at 11:19 PM, Максим Кольцов> wrote: > >> Hi all, >> >> I've been discussing this with Dave for about a month now. Today I >> finally present a proposed patch to update pgadmin4's Docker >> packaging. >> >> Key features of this update: >> - Main image is based on python:3.6-alpine3.7. >> Using Alpine linux leads to much smaller image >> - All build is done with Docker multi-stage build. First of all build >> the frontend in node:6 image, >> then build Sphinx documentation in separate Python container and in >> the end just install all >> dependencies in a clean python:3.6-alpine3.7 image, so that it does >> not have any leftovers from the build >> process and we don't rely on any tools available on the host. >> - Use Gunicorn (http://gunicorn.org) as lightweight HTTP / WSGI server. >> Gunicorn supports both HTTP and HTTPS. >> - Install Alpine postgresql-client package, which includes pg_dump and >> other tools and config >> PgAdmin to find these tools by default >> - Byte-compile all PgAdmin Python code in Dockerfile with optimization >> (-O) enabled. This way Python >>does not have to compile modules on each container restart and >> consume space in overlay fs >> >> Please find attached patch from "git format-patch". >> > >
Re: [pgAdmin4][Patch] Remake Docker container packaging
Hello, I tested the patch and it is working fine. - I had clean system before but after running DockerBuild, I can see 3 different images of pgAdmin4, Is this expected? - We can remove /tests/ folder from each folders, we can also remove /web/regression/ folder from the container, they are used to run tests. We don't require them on production code. - Can we make the ports configurable? https://redmine.postgresql.org/issues/2997 - Allow user to choose whether to run it as Single user mode(SERVER_MODE = False) or Multiuser mode(SERVER_MODE = True) -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Sat, Mar 31, 2018 at 11:19 PM, Максим Кольцовwrote: > Hi all, > > I've been discussing this with Dave for about a month now. Today I > finally present a proposed patch to update pgadmin4's Docker > packaging. > > Key features of this update: > - Main image is based on python:3.6-alpine3.7. > Using Alpine linux leads to much smaller image > - All build is done with Docker multi-stage build. First of all build > the frontend in node:6 image, > then build Sphinx documentation in separate Python container and in > the end just install all > dependencies in a clean python:3.6-alpine3.7 image, so that it does > not have any leftovers from the build > process and we don't rely on any tools available on the host. > - Use Gunicorn (http://gunicorn.org) as lightweight HTTP / WSGI server. > Gunicorn supports both HTTP and HTTPS. > - Install Alpine postgresql-client package, which includes pg_dump and > other tools and config > PgAdmin to find these tools by default > - Byte-compile all PgAdmin Python code in Dockerfile with optimization > (-O) enabled. This way Python >does not have to compile modules on each container restart and > consume space in overlay fs > > Please find attached patch from "git format-patch". >
[pgAdmin4][Patch] Remake Docker container packaging
Hi all, I've been discussing this with Dave for about a month now. Today I finally present a proposed patch to update pgadmin4's Docker packaging. Key features of this update: - Main image is based on python:3.6-alpine3.7. Using Alpine linux leads to much smaller image - All build is done with Docker multi-stage build. First of all build the frontend in node:6 image, then build Sphinx documentation in separate Python container and in the end just install all dependencies in a clean python:3.6-alpine3.7 image, so that it does not have any leftovers from the build process and we don't rely on any tools available on the host. - Use Gunicorn (http://gunicorn.org) as lightweight HTTP / WSGI server. Gunicorn supports both HTTP and HTTPS. - Install Alpine postgresql-client package, which includes pg_dump and other tools and config PgAdmin to find these tools by default - Byte-compile all PgAdmin Python code in Dockerfile with optimization (-O) enabled. This way Python does not have to compile modules on each container restart and consume space in overlay fs Please find attached patch from "git format-patch". From 67e387525a7c832958858c7ec1a1b7076382090e Mon Sep 17 00:00:00 2001 From: Maxim KoltsovDate: Sat, 31 Mar 2018 20:37:51 +0300 Subject: [PATCH] Re-make Docker container packaging Key features of this update: - Main image is based on python:3.6-alpine3.7. Using Alpine linux leads to much smaller image - All build is done with Docker multi-stage build. First of all build the frontend in node:6 image, then build Sphinx documentation in separate Python container and in the end just install all dependencies in a clean python:3.6-alpine3.7 image, so that it does not have any leftovers from the build process and we don't rely on any tools available on the host. - Use Gunicorn (http://gunicorn.org) as lightweight HTTP / WSGI server. Gunicorn supports both HTTP and HTTPS. - Install Alpine postgresql-client package, which includes pg_dump and other tools and config PgAdmin to find these tools by default - Byte-compile all PgAdmin Python code in Dockerfile with optimization (-O) enabled. This way Python does not have to compile modules on each container restart and consume space in overlay fs --- pkg/docker/Dockerfile | 89 - pkg/docker/README | 58 ++--- pkg/docker/build.sh | 57 + pkg/docker/config_distro.py | 4 ++ pkg/docker/entry.sh | 29 --- pkg/docker/entrypoint.sh| 21 +++ pkg/docker/pgadmin4.conf.j2 | 43 -- pkg/docker/run_pgadmin.py | 4 ++ 8 files changed, 112 insertions(+), 193 deletions(-) create mode 100644 pkg/docker/config_distro.py delete mode 100644 pkg/docker/entry.sh create mode 100755 pkg/docker/entrypoint.sh delete mode 100644 pkg/docker/pgadmin4.conf.j2 create mode 100644 pkg/docker/run_pgadmin.py diff --git a/pkg/docker/Dockerfile b/pkg/docker/Dockerfile index 1c1dde27..083dbd60 100644 --- a/pkg/docker/Dockerfile +++ b/pkg/docker/Dockerfile @@ -7,58 +7,63 @@ # # -# Get the basics out of the way -FROM centos:latest +# First of all, build frontend with NodeJS in a separate builder container +# Node-6 with ABI v48 is supported by all needed C++ packages +FROM node:6 AS node-builder -LABEL name="pgAdmin 4" \ -vendor="The pgAdmin Development Team" \ -license="PostgreSQL" +COPY ./pgadmin4/web/ /pgadmin4/web/ +WORKDIR /pgadmin4/web -# We only need the web/ directory, and a few other things -COPY web /var/www/pgadmin -COPY requirements.txt /var/www/pgadmin +RUN yarn install --cache-folder ./ycache --verbose && \ +yarn run bundle && \ +rm -rf ./ycache ./pgadmin/static/js/generated/.cache -# Install everything we need. Use easy_install to get pip, to avoid setting up EPEL -RUN yum install -y python-setuptools python-devel httpd mod_wsgi mod_ssl gcc -RUN easy_install pip -RUN pip install j2cli +# Build Sphinx documentation in separate container +FROM python:3.6-alpine3.7 as docs-builder -# Now install the Python runtime dependencies -RUN pip install -r /var/www/pgadmin/requirements.txt +# Install only dependencies absolutely required for documentation building +RUN apk add --no-cache make +RUN pip install --no-cache-dir \ +sphinx flask_babel flask_security flask_paranoid python-dateutil flask_sqlalchemy \ +flask_gravatar simplejson -# Create required directories for config +COPY ./pgadmin4/ /pgadmin4 +RUN LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 make -C /pgadmin4/docs/en_US -f Makefile.sphinx html -# Create required directories for running -RUN mkdir -p /var/log/pgadmin -RUN chown -R apache /var/log/pgadmin -RUN mkdir -p /var/lib/pgadmin -RUN chown -R apache /var/lib/pgadmin -RUN mkdir -p /certs -RUN chown -R apache /certs -RUN chmod 700 /certs +# Then install