You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @edwardinubuntu, here I leave you the latest version of the dockerfile, notice that I change line 15 (17 now) where the checkout to the hash of the version is made to the checkout to the tag. I think that this way it is understood a little better and makes it easier to use different versions.
#STEP 1: BUILD# Environemnt to install flutter and build webFROM debian:latest AS build-env
#install all needed stuffRUN apt-get update
RUN apt-get install -y curl git unzip
#define variablesARG FLUTTER_VERSION=3.13.0
ARG FLUTTER_SDK_LOCATION=/usr/local/flutter
ARG APP_LOCATION=/app/
#clone flutterRUN git clone https://github.com/flutter/flutter.git $FLUTTER_SDK_LOCATION
#change dir to current flutter folder and make a checkout to the specific versionRUN cd $FLUTTER_SDK_LOCATION && git checkout tags/$FLUTTER_VERSION
#setup the flutter path as an environment variableENV PATH="$FLUTTER_SDK_LOCATION/bin:$FLUTTER_SDK_LOCATION/bin/cache/dart-sdk/bin:${PATH}"#Start to run Flutter commands#doctor to see if all was installed okRUN flutter doctor -v
#create folder to copy source codeRUN mkdir $APP_LOCATION
#copy source code to folderCOPY . $APP_LOCATION
#stup new folder as the working directoryWORKDIR $APP_LOCATION
#Run build: 1 - clean, 2 - pub get, 3 - build webRUN flutter clean
RUN flutter pub get
RUN flutter build web
#once heare the app will be compiled and ready to deploy#STEP 2: DEPLOY#use nginx to deployFROM nginx:1.25.2-alpine
#copy the info of the builded web app to nginxCOPY --from=build-env /app/build/web /usr/share/nginx/html
#Expose port and run nginxEXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Hello @edwardinubuntu, here I leave you the latest version of the dockerfile, notice that I change line 15 (17 now) where the checkout to the hash of the version is made to the checkout to the tag. I think that this way it is understood a little better and makes it easier to use different versions.
I made my version of this project, check it out
The text was updated successfully, but these errors were encountered: