diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..8acebbb --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,18 @@ +name: Docker Image CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build the Docker image + run: docker build . --file ubuntu18.04-python3.7.2/Dockerfile --tag my-image-name:$(date +%s) diff --git a/ubuntu18.04-python3.7.2/Dockerfile b/ubuntu18.04-python3.7.2/Dockerfile index 966476c..7652fbf 100644 --- a/ubuntu18.04-python3.7.2/Dockerfile +++ b/ubuntu18.04-python3.7.2/Dockerfile @@ -1,20 +1,26 @@ FROM ubuntu:18.04 +ARG DEBIAN_FRONTEND=noninteractive +ENV DEBIAN_FRONTEND noninteractive + # use bash shell as default SHELL ["/bin/bash", "-c"] +ENV TZ=asia/kolkata +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone +# set some local environment variables +ENV LANG en_US.UTF-8 + # install python, pip and pipenv RUN apt-get update && \ - apt-get install -y sudo curl llvm git gcc make openssl libssl-dev libbz2-dev libreadline-dev libncurses5-dev libsqlite3-dev zlib1g-dev libffi-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev liblzma-dev + apt-get install -y sudo curl llvm git gcc make openssl wget net-tools libssl-dev libbz2-dev libreadline-dev libncurses5-dev libsqlite3-dev zlib1g-dev libffi-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev liblzma-dev -# add the user Motoko, tribute to https://en.wikipedia.org/wiki/Motoko_Kusanagi -RUN useradd --create-home --no-log-init --system motoko && \ - echo "motoko ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers -USER motoko -WORKDIR /home/motoko -# set some local environment variables -ENV LANG en_US.UTF-8 +# add the user theja, tribute to https://en.wikipedia.org/wiki/theja0473/ubuntu18.04-python3.7.2 +RUN useradd --create-home --no-log-init --system theja && \ + echo "theja ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers +USER theja +WORKDIR /home/theja # install pyenv for motoko RUN curl https://pyenv.run | bash