File size: 623 Bytes
de36bfb
6c3b1c0
5ac4bad
ddb0f1d
95c1b67
ddb0f1d
 
80c1e4a
ddb0f1d
 
80c1e4a
ddb0f1d
 
 
de36bfb
a974a2c
80c1e4a
ddb0f1d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# --- Dockerfile ---
FROM rocker/shiny:latest

# utilitário para normalizar EOL e pacotes R necessários
RUN apt-get update && apt-get install -y --no-install-recommends dos2unix && \
    R -e "install.packages(c('httr2'))" && \
    rm -rf /var/lib/apt/lists/*

# Copia a app Shiny
COPY app.R /srv/shiny-server/app.R

# Normaliza EOL e ownership
RUN dos2unix /srv/shiny-server/app.R && \
    chown -R shiny:shiny /srv/shiny-server

EXPOSE 7860

# Inicia a app diretamente (sem shiny-server.conf e sem init.sh)
CMD ["R","-e","shiny::runApp('/srv/shiny-server', host='0.0.0.0', port=as.integer(Sys.getenv('PORT','7860')))"]