FROM amazonlinux # Sets the arguments. ARG BIN_NAME=nemt-portal-api ARG APP_NAME=nemt-portal-api ARG WORKDIR=/opt/app/ # Creates the necessary directories. RUN mkdir -p /opt/app/docs RUN mkdir -p /opt/app/static RUN mkdir -p /var/log/bsbsi # Copies the files to the container. COPY ./dist/${BIN_NAME} /opt/app/${BIN_NAME} ADD ./dist/docs/ /opt/app/docs/ ADD ./dist/static/ /opt/app/static/ ADD ./dist/config.toml /opt/app/config.toml ADD ./dist/authorization_model.conf /opt/app/authorization_model.conf ADD ./dist/authorization_policy.csv /opt/app/authorization_policy.csv # Sets and executes the app. WORKDIR /opt/app EXPOSE 5000 CMD ./nemt-portal-api