mirror of
				https://github.com/avatao-content/test-tutorial-framework
				synced 2025-11-04 05:52:56 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM eu.gcr.io/avatao-challengestore/tutorial-framework
 | 
						|
 | 
						|
# Define variables to use later
 | 
						|
ENV TFW_SERVER_DIR="/srv/.tfw"                      \
 | 
						|
    TFW_WEBSERVICE_DIR="/srv/login_service"      \
 | 
						|
    TFW_IDE_WD="/home/${AVATAO_USER}/workdir"       \
 | 
						|
    TFW_TERMINADO_WD="/home/${AVATAO_USER}/workdir"
 | 
						|
 | 
						|
# Copy TFW related stuff to a dedicated directory
 | 
						|
COPY solvable/src ${TFW_SERVER_DIR}/
 | 
						|
 | 
						|
# Copy webservice to a dedicated directory
 | 
						|
COPY solvable/src/webservice/ ${TFW_WEBSERVICE_DIR}/
 | 
						|
ADD solvable/src/webservice/frontend-deps.tar ${TFW_WEBSERVICE_DIR}/static
 | 
						|
 | 
						|
# Create IDE directory, symlink server source and give proper permissions to AVATAO_USER
 | 
						|
RUN mkdir -p ${TFW_IDE_WD}                                               &&\
 | 
						|
    ln -s ${TFW_WEBSERVICE_DIR}/server.py ${TFW_IDE_WD}                  &&\
 | 
						|
    chown -R ${AVATAO_USER}: ${TFW_IDE_WD} && chmod -R 755 ${TFW_IDE_WD}
 | 
						|
 | 
						|
# Hide TFW related code from user
 | 
						|
RUN chown -R root:root ${TFW_SERVER_DIR} && chmod -R 700 ${TFW_SERVER_DIR}
 | 
						|
 | 
						|
# Make AVATAO_USER's home writeable and set it as WORKDIR
 | 
						|
VOLUME ["/home/${AVATAO_USER}"]
 | 
						|
WORKDIR /home/${AVATAO_USER}
 |