@robotical/martyblocks 1.6.9 → 1.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,13 @@
1
+ version: '3.8'
2
+ services:
3
+ myservice:
4
+ image: ubuntu:latest
5
+ platform: linux/x86_64
6
+ build:
7
+ context: .
8
+ dockerfile: Dockerfile.dev
9
+ ports:
10
+ - "8601:8601"
11
+ volumes:
12
+ - .:/app
13
+ command: bash
package/Dockerfile.dev ADDED
@@ -0,0 +1,56 @@
1
+ # Using Ubuntu as base image
2
+ FROM ubuntu:latest
3
+
4
+ # Installing python, openjdk, git, curl, and other necessary packages
5
+ RUN apt-get update && \
6
+ apt-get install -y python2.7 openjdk-11-jre-headless git curl xz-utils
7
+
8
+ # Installing Node.js v16.20.0
9
+ RUN curl -fsSL https://nodejs.org/dist/v16.20.0/node-v16.20.0-linux-x64.tar.xz | tar -xJv -C /usr/local --strip-components=1
10
+
11
+ # Set the environment variables
12
+ ENV MBHome /Robotical/MartyBlocks
13
+ ENV mblib $MBHome/marty-blocks-lib
14
+ ENV REPLACEMENTS $MBHome/marty-blocks-lib/replacements
15
+ ENV blocks_original $MBHome/scratch-blocks
16
+ ENV vm_original $MBHome/scratch-vm
17
+ ENV gui_original $MBHome/scratch-gui
18
+ ENV NODE_OPTIONS "--max-old-space-size=5120"
19
+ ENV PATH="/root/.pyenv/shims:${PATH}"
20
+
21
+ # Set the workdir
22
+ WORKDIR $MBHome
23
+
24
+ # Clone repos
25
+ RUN git clone -b develop https://github.com/llk/scratch-blocks.git scratch-blocks
26
+ RUN git clone -b develop https://github.com/llk/scratch-vm.git scratch-vm
27
+ RUN git clone -b develop https://github.com/llk/scratch-gui.git scratch-gui
28
+
29
+ # Checkout appropriate commit
30
+ RUN cd $blocks_original && git reset --hard f9107bf5d0479d632658f2b203995f5ae6d75363
31
+ RUN cd $vm_original && git reset --hard 3b36a8e3ea7f3caa5b4bf4ae7b4f821a986a1378
32
+ RUN cd $gui_original && git reset --hard 738c86bb58e336711280aec33c510d7aef79408e
33
+
34
+ # Install scratch
35
+ RUN cd $blocks_original && npm install
36
+ RUN cd $vm_original && npm install
37
+ RUN cd $gui_original && npm install
38
+
39
+ # Install marty blocks library
40
+ RUN cd $mblib && npm install
41
+
42
+ # Link repositories
43
+ RUN cd $mblib && npm link
44
+ RUN cd $blocks_original && npm link && npm link marty-blocks-lib
45
+ RUN cd $vm_original && npm link && npm link marty-blocks-lib scratch-blocks
46
+ RUN cd $gui_original && npm link marty-blocks-lib scratch-blocks scratch-vm
47
+
48
+ # Build repositories and start scratch gui
49
+ RUN cd $mblib && npx node ./set-development.js
50
+ RUN cp -r $REPLACEMENTS/* $MBHome
51
+ RUN cd $blocks_original && ln -s $(npm root)/google-closure-library ../closure-library; npm run prepublish
52
+ RUN cd $vm_original && npm run build
53
+ RUN cd $gui_original && BUILD_MODE=dist npm run build
54
+ RUN cd $gui_original && npm start
55
+
56
+ CMD ["bash"]