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
Copy file name to clipboardExpand all lines: README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,34 @@ The user must be a member of the project you want to copy. This user must be the
40
40
1. edit settings.ts
41
41
1. run `npm run start`
42
42
43
+
### Docker
44
+
45
+
If you don't have Node.js installed in your local environment and don't want to install it you can use the Dockerized approach.
46
+
47
+
1. Make sure that you have [Docker](https://docs.docker.com/engine/install/) installed in your computer. You can test running `docker version` in the terminal.
48
+
1.`cp sample_settings.ts settings.ts`
49
+
1. edit settings.ts
50
+
1.`docker build -t node-gitlab-2-github:latest .`, or, you can use `make build-image`
51
+
1.`docker run node-gitlab-2-github:latest`, or, you can use `make docker-run`
52
+
53
+
If you want to let it run in the background (detached mode), just use the following command:
54
+
55
+
1.`docker run -d node-gitlab-2-github:latest`
56
+
57
+
### Docker with bind mounts
58
+
59
+
In order to optimize the usage of the dockerized application, one can use the `bind mounts` feature of Docker ([Docker docs](https://docs.docker.com/storage/bind-mounts/)). This way, whenever you change the `settings.ts` file in the host environment it will change in the container filesystem as well.
60
+
61
+
The process to use this trick is pretty much the same we presented before, the only different is the addition of a flag in the docker command to tell it what is the directory/file to be bound.
62
+
63
+
1. Make sure that you have [Docker](https://docs.docker.com/engine/install/) installed in your computer. You can test running `docker version` in the terminal.
64
+
1.`cp sample_settings.ts settings.ts`
65
+
1. edit settings.ts
66
+
1.`docker build -t node-gitlab-2-github:latest .`, or, you can use `make build-image`
67
+
1. This command must work for **Linux** or **Mac**: `docker run --mount type=bind,source="$(pwd)/settings.ts",target="/app/settings.ts",readonly node-gitlab-2-github:latest`, or, you can use `make docker-run-bind`
68
+
69
+
* If you want to run this last command in the Windows environment, please consult the Docker documentation on how to solve the problem of the pwd command expanding incorrectly there - [Docker documentation - Topics for windows](https://docs.docker.com/desktop/troubleshoot/topics/#topics-for-windows).
0 commit comments