-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2905 from ethereum/docker_compress1
Optimizing docker build
- Loading branch information
Showing
9 changed files
with
120 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ remix | |
contracts | ||
TODO | ||
.tern-port | ||
temp_publish_docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,6 @@ | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: "3.7" | ||
x-project-base: | ||
&project-base | ||
restart: always | ||
networks: | ||
- remixide | ||
|
||
networks: | ||
remixide: | ||
|
||
services: | ||
remixide: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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; | ||
} | ||
} | ||
} |