Better Docker handling, added sass compiler to Docker image
This commit is contained in:
		
							parent
							
								
									f329e2b8fb
								
							
						
					
					
						commit
						ff049925e2
					
				
							
								
								
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								Dockerfile
									
									
									
									
									
								
							@ -2,12 +2,18 @@ FROM google/dart:2.7
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
WORKDIR /app
 | 
					WORKDIR /app
 | 
				
			||||||
 | 
					
 | 
				
			||||||
RUN mkdir /pub-cache
 | 
					# Get Dart dependencies
 | 
				
			||||||
 | 
					RUN mkdir -p /pub-cache
 | 
				
			||||||
ENV PUB_CACHE=/pub-cache
 | 
					ENV PUB_CACHE=/pub-cache
 | 
				
			||||||
ENV PATH="${PATH}:/pub-cache/bin"
 | 
					ENV PATH="${PATH}:/pub-cache/bin"
 | 
				
			||||||
RUN pub global activate webdev
 | 
					RUN pub global activate webdev
 | 
				
			||||||
 | 
					 | 
				
			||||||
ADD pubspec.* /app/
 | 
					ADD pubspec.* /app/
 | 
				
			||||||
RUN pub get
 | 
					RUN pub get
 | 
				
			||||||
ADD . /app/
 | 
					 | 
				
			||||||
RUN pub get --offline
 | 
					RUN pub get --offline
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN apt update && apt install ruby-sass ruby-dev build-essential -y
 | 
				
			||||||
 | 
					RUN gem install sass-listen
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ADD . /app/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					CMD ["./start.sh"]
 | 
				
			||||||
 | 
				
			|||||||
@ -4,8 +4,7 @@ services:
 | 
				
			|||||||
  web:
 | 
					  web:
 | 
				
			||||||
    build: .
 | 
					    build: .
 | 
				
			||||||
    ports:
 | 
					    ports:
 | 
				
			||||||
      - "8010:8010"
 | 
					      - "8010:8080"
 | 
				
			||||||
    command: webdev serve --release web:8010 --hostname 0.0.0.0
 | 
					 | 
				
			||||||
    restart: always
 | 
					    restart: always
 | 
				
			||||||
    volumes:
 | 
					    volumes:
 | 
				
			||||||
      - ./web/:/app/web/
 | 
					      - ./web/:/app/web/
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user