Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
6a6cf803
Commit
6a6cf803
authored
Jun 12, 2020
by
Edi
Committed by
ioedeveloper
Jul 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optimizing docker build
parent
f4b039e9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
123 additions
and
29 deletions
+123
-29
.dockerignore
.dockerignore
+1
-0
.gitignore
.gitignore
+4
-2
Dockerfile
Dockerfile
+4
-17
Dockerfile.dev
Dockerfile.dev
+13
-5
README.md
apps/remix-ide/README.md
+37
-0
build.yaml
build.yaml
+15
-0
build_and_publish_docker_images.sh
ci/build_and_publish_docker_images.sh
+6
-2
docker-compose.yaml
docker-compose.yaml
+3
-3
nginx.conf
nginx.conf
+40
-0
No files found.
.dockerignore
0 → 100644
View file @
6a6cf803
node_modules
.gitignore
View file @
6a6cf803
...
...
@@ -37,4 +37,7 @@ testem.log
# System Files
.DS_Store
Thumbs.db
\ No newline at end of file
contracts
TODO
.tern-port
temp_publish_docker
Dockerfile
View file @
6a6cf803
FROM
node:10
# Create Remix user, don't use root!
# RUN yes | adduser --disabled-password remix && mkdir /app
# USER remix
FROM
nginx:alpine
WORKDIR
/
# #Now do remix stuff
# USER remix
WORKDIR
/home/remix
COPY
./temp_publish_docker/ /usr/share/nginx/html/
RUN
git clone https://github.com/ethereum/remix-ide.git
RUN
git checkout origin remix_live
WORKDIR
/home/remix/remix
RUN
npm
install
RUN
npm run build
EXPOSE
8080 65520
CMD
["npm", "run", "serve"]
EXPOSE
80
Dockerfile.dev
View file @
6a6cf803
...
...
@@ -10,11 +10,19 @@ WORKDIR /home/remix
COPY ./ ./
WORKDIR /home/remix/remix
# npm ci would probably be better
RUN npm install
RUN npm ci
RUN npm run build
EXPOSE 8080 65520
FROM nginx:alpine
WORKDIR /
CMD ["npm", "run", "serve"]
COPY --from=0 /home/remix/build/ /usr/share/nginx/html/build/
COPY --from=0 /home/remix/index.html /usr/share/nginx/html/index.html
COPY --from=0 /home/remix/nginx.conf /etc/nginx/nginx.conf
COPY --from=0 /home/remix/assets/ /usr/share/nginx/html/assets/
COPY --from=0 /home/remix/icon.png /usr/share/nginx/html/icon.png
COPY --from=0 /home/remix/background.js /usr/share/nginx/html/background.js
COPY --from=0 /home/remix/soljson.js /usr/share/nginx/html/soljson.js
COPY --from=0 /home/remix/package.json /usr/share/nginx/html/package.json
EXPOSE 80
apps/remix-ide/README.md
View file @
6a6cf803
...
...
@@ -45,6 +45,43 @@ npm run setupremix # only if you plan to link remix and remix-ide repositories
npm start
```
## Docker:
Prerequisites:
*
Docker (https://docs.docker.com/desktop/)
*
Docker-compose (https://docs.docker.com/compose/install/)
### Run with docker
If you want to run latest changes that are merged into master branch then run:
```
docker pull remixproject/remix-ide:latest
docker run -p 8080:80 remixproject-remix-ide:latest
```
If you want to run latest remix-live release run.
```
docker pull remixproject/remix-ide:remix_live
docker run -p 8080:80 remixproject-remix-ide:remix_live
```
### Run with docker-compose:
To run locally without building you only need docker-compose.yaml file and you can run:
```
docker-compose pull
docker-compose up -d
```
Then go to http://localhost:8080 and you can use you Remix instance.
To fetch docker-compose file without cloning this repo run:
```
curl https://raw.githubusercontent.com/ethereum/remix-ide/master/docker-compose.yaml > docker-compose.yaml
```
## DEVELOPING:
Run
`npm start`
and open
`http://127.0.0.1:4200`
in your browser.
...
...
build.yaml
0 → 100644
View file @
6a6cf803
version
:
"
3.7"
x-project-base
:
&project-base
restart
:
always
networks
:
-
remixide
networks
:
remixide
:
services
:
remixide
:
build
:
context
:
.
dockerfile
:
Dockerfile
ci/build_and_publish_docker_images.sh
View file @
6a6cf803
#!/bin/bash
set
-e
# If not staging and master branch are existing
export
TAG
=
"
$CIRCLE_BRANCH
"
if
[
"
$CIRCLE_BRANCH
"
==
"master"
]
;
then
export
TAG
=
"latest"
;
fi
rm
-rf
temp_publish_docker
mkdir
temp_publish_docker
cp
-r
$FILES_TO_PACKAGE
temp_publish_docker
docker login
--username
$DOCKER_USER
--password
$DOCKER_PASS
docker-compose build
docker-compose
-f
docker-compose.yaml
-f
build.yaml
build
docker push remixproject/remix-ide:
$TAG
docker-compose.yaml
View file @
6a6cf803
...
...
@@ -13,6 +13,6 @@ services:
<<
:
*project-base
image
:
remixproject/remix-ide:$TAG
container_name
:
remixide-${TAG}
build
:
context
:
.
dockerfile
:
Dockerfile.dev
ports
:
-
8080:80
-
65520:65520
nginx.conf
0 → 100644
View file @
6a6cf803
user
nginx
;
worker_processes
1
;
error_log
/var/log/nginx/error.log
warn
;
pid
/var/run/nginx.pid
;
events
{
worker_connections
1024
;
}
http
{
include
/etc/nginx/mime.types
;
default_type
application/octet-stream
;
log_format
main
'
$remote_addr
-
$remote_user
[
$time_local
]
"
$request
"
'
'
$status
$body_bytes_sent
"
$http_referer
"
'
'"
$http_user_agent
"
"
$http_x_forwarded_for
"'
;
access_log
/var/log/nginx/access.log
main
;
sendfile
on
;
keepalive_timeout
300
;
gzip_disable
"msie6"
;
include
/etc/nginx/conf.d/*.conf
;
server
{
listen
80
default_server
;
listen
[::]:80
default_server
;
root
/usr/share/nginx/html
;
index
index.html
index.htm
;
server_name
_
;
location
/
{
try_files
$uri
$uri
/
/index.html
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment