This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # mount image base | |
| FROM ruby:3.1.2-alpine3.16 AS base | |
| RUN apk --update add build-base git libpq-dev tzdata | |
| RUN git clone https://github.com/adermanjr/cmaster-app.git | |
| WORKDIR /cmaster-app | |
| RUN bundle config set --local without 'development test' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sintax | |
| --- old --- x --- new --- | |
| docker ps -a docker container ls | |
| docker run debian docker container run debian | |
| docker help docker container help | |
| # download image from repository | |
| docker pull centos | |
| # with specific tag | |
| docker pull centos:tag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Error Handling | |
| error_handling() { | |
| errcode=$? | |
| echo "error $errorcode executing $BASH_COMMAND on line ${BASH_LINENO[0]}" | |
| exit $errcode | |
| } | |
| trap error_handling ERR |