You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And then add a docker setup hook to login to your private registry on the server. See [Hooks](#hooks) for example of logging into a private docker registry.
444
+
429
445
### Image Port
430
446
431
447
You can set `meteor.docker.port` to the port to expose from the container. This does not affect the port the app is accessed on, only the port the app runs on inside the docker container.
@@ -813,6 +829,22 @@ module.exports = {
813
829
'post.meteor.restart': {
814
830
remoteCommand:'docker logs --tail 50 app-name'
815
831
},
832
+
'pre.docker.setup'(api) {
833
+
// Login to private Gitlab docker registry
834
+
constconfig=api.getConfig();
835
+
constregistry='registry.gitlab.com';
836
+
constu=process.env.REGISTRY_USERNAME;
837
+
constp=process.env.REGISTRY_PASSWORD;
838
+
if (!u ||!p) {
839
+
thrownewError(
840
+
'You must provide registry login details'
841
+
);
842
+
}
843
+
returnapi.runSSHCommand(
844
+
config.servers.one,
845
+
`docker login -u ${u} -p ${p}${registry}`
846
+
);
847
+
},
816
848
'post.docker.setup'(api) {
817
849
// Same api as is given to plugin command handlers
818
850
// If this runs asynchronous tasks, it needs to return a promise.
0 commit comments