Move Dockerfile to top level + simplify. Add docker compose
This commit is contained in:
parent
674e4a1c6c
commit
c15ec12361
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
||||
FROM python:3.9
|
||||
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
RUN pip install -r /app/requirements.txt
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app/
|
5
docker-compose.yml
Normal file
5
docker-compose.yml
Normal file
@ -0,0 +1,5 @@
|
||||
services:
|
||||
mev-inspect:
|
||||
build: .
|
||||
volumes:
|
||||
- .:/app
|
@ -1,19 +0,0 @@
|
||||
FROM python:3.9
|
||||
LABEL maintainer "Nicola Bernini <nicola.bernini@gmail.com>"
|
||||
COPY requirements.txt .
|
||||
RUN apt-get update && apt-get -y install sudo
|
||||
|
||||
# Create User
|
||||
ARG user=mev
|
||||
ARG password=mev
|
||||
RUN useradd -m ${user} && echo "${user}:${password}" | chpasswd && adduser mev sudo
|
||||
|
||||
# Switch to user
|
||||
USER mev
|
||||
|
||||
# Install Python Requirements
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
|
||||
# Initial Dir
|
||||
WORKDIR /project
|
@ -1,2 +0,0 @@
|
||||
web3
|
||||
pyyaml
|
Loading…
x
Reference in New Issue
Block a user