| 
									
										
										
										
											2022-02-27 13:03:37 +01:00
										 |  |  | # syntax=docker/dockerfile:1.3 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-09-24 13:14:20 +02:00
										 |  |  | # bundle the admin webapp | 
					
						
							| 
									
										
										
										
											2022-02-27 13:03:37 +01:00
										 |  |  | FROM --platform=${BUILDPLATFORM} node:17.6.0-alpine3.15 AS admin_builder | 
					
						
							| 
									
										
										
										
											2021-07-27 14:45:27 +02:00
										 |  |  | RUN apk update && apk upgrade --no-cache | 
					
						
							|  |  |  | RUN apk add git | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RUN git clone https://github.com/superseriousbusiness/gotosocial-admin | 
					
						
							|  |  |  | WORKDIR /gotosocial-admin | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RUN npm install | 
					
						
							|  |  |  | RUN node index.js | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-27 13:03:37 +01:00
										 |  |  | FROM --platform=${TARGETPLATFORM} alpine:3.15.0 AS executor | 
					
						
							| 
									
										
										
										
											2021-05-23 23:43:04 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | # copy over the binary from the first stage | 
					
						
							| 
									
										
										
										
											2022-02-27 13:03:37 +01:00
										 |  |  | COPY --chown=1000:1000 gotosocial /gotosocial/gotosocial | 
					
						
							| 
									
										
										
										
											2021-05-23 23:43:04 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | # copy over the web directory with templates etc | 
					
						
							| 
									
										
										
										
											2022-02-27 13:03:37 +01:00
										 |  |  | COPY --chown=1000:1000 web /gotosocial/web | 
					
						
							| 
									
										
										
										
											2021-08-02 19:06:44 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-07-27 14:45:27 +02:00
										 |  |  | # copy over the admin directory | 
					
						
							| 
									
										
										
										
											2022-02-27 13:03:37 +01:00
										 |  |  | COPY --chown=1000:1000 --from=admin_builder /gotosocial-admin/public /gotosocial/web/assets/admin | 
					
						
							| 
									
										
										
										
											2021-05-23 23:43:04 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-02-27 13:03:37 +01:00
										 |  |  | WORKDIR "/gotosocial" | 
					
						
							| 
									
										
										
										
											2021-05-23 23:43:04 +02:00
										 |  |  | ENTRYPOINT [ "/gotosocial/gotosocial", "server", "start" ] |