August, 2019
Docker Image and Container Content Inspection
2019-08-13
Build Docker image with Dockerfile:
docker build -t image_name .
Image can be exported into tar files:
docker image save image_name -o save.tar
However, generated save.tar
file contains individual layers as tar files.
To see final result we have to export container and not the image:
docker export container_name | tar -tf -
Reference: https://stackoverflow.com/questions/44769315/how-to-see-docker-image-contents/46526598#46526598.
How to Restore Maven Repository from Cached Content
2019-08-05
If artifacts in server repository have been deleted, then content can be restored by coping cached version in ~/.m2/repository
into missing artifacts directory.
Things to keep in mind:
- MD5 and SHA1 hash files will be missing.
- Cache copy has extra files related to cache maintenance.
Issue #1 is easy to fix with PowerShell command:
Get-Filehash "full-path-to-directory-without-hash-files" Algorithm md5
Get-Filehash "full-path-to-directory-without-hash-files" Algorithm sha1
Then create corresponding md5 and sha1 files with the same name as resource and md5 or sha1 extension. Copy output of powershell Hash column into the hash file.
To solve issue #2 make sure that you only have maven-metadata.xml
file. Most likely it will exist in the form of the file with repository name. Change the name of that file to be maven-metadata.xml
.
Generate hash files maven-metadata.xml.md5
and maven-metadata.xmml.sha1
using instructions to issue #1.
Git Extensions for Windows Integration with Github
2019-08-02
Git Extensions for Windows (GEW) provide Github integration. For example, pull requests and forks can be done from within the GEW.
Trying to use Github integration without properly registering with Github results in crashes when actions under Github menu are triggered.
To enable Github integration we need to create OAuth token on Github website from our own account. Follow instructions.
After token is created, go to “Tools” menu -> “Settings” menu item. Navigate to “Plugins” -> “GitHub” on the left side tree control of Settings dialog. Paste OAuth Token there.
You might have tor restart the application.
You should be good to go using “Github” menu items.