dockerfile

adding startup script to dockerfile

寵の児 提交于 2021-01-02 05:25:32
问题 I have built my docker image using openjdk. # config Dockerfile FROM openjdk:8 COPY . /usr/src/myapp WORKDIR /usr/src/myapp # build image docker build -t shantanuo/dbt . It is working as expected using this command... docker run -p 8081:8080 -it shantanuo/dbt Once I log-in, I have to run this command... sh bin/startup.sh My Question: Is it possible to add the startup command to dockerfile? I tried adding this line in my dockerfile. CMD ["sh", "bin/startup.sh"] But after building the image, I

adding startup script to dockerfile

牧云@^-^@ 提交于 2021-01-02 05:25:29
问题 I have built my docker image using openjdk. # config Dockerfile FROM openjdk:8 COPY . /usr/src/myapp WORKDIR /usr/src/myapp # build image docker build -t shantanuo/dbt . It is working as expected using this command... docker run -p 8081:8080 -it shantanuo/dbt Once I log-in, I have to run this command... sh bin/startup.sh My Question: Is it possible to add the startup command to dockerfile? I tried adding this line in my dockerfile. CMD ["sh", "bin/startup.sh"] But after building the image, I

TesseractNotFound issue when containerizing in docker

独自空忆成欢 提交于 2021-01-01 08:14:57
问题 Problem: I had tesseract installed in local machine and its path is at /usr/local/Cellar/tesseract/4.1.1/bin/tesseract . Everything works perfectly until I containerized it in docker with error message as: pytesseract.pytesseract.TesseractNotFoundError: is not installed or it's not your PATH What I've tried: Based on the error message, this is what I've tried: 1). Add PATH in docker desktop app under file sharing to /usr/local and mount the file path from local to docker - still getting the

TesseractNotFound issue when containerizing in docker

我的未来我决定 提交于 2021-01-01 08:12:53
问题 Problem: I had tesseract installed in local machine and its path is at /usr/local/Cellar/tesseract/4.1.1/bin/tesseract . Everything works perfectly until I containerized it in docker with error message as: pytesseract.pytesseract.TesseractNotFoundError: is not installed or it's not your PATH What I've tried: Based on the error message, this is what I've tried: 1). Add PATH in docker desktop app under file sharing to /usr/local and mount the file path from local to docker - still getting the

GraphQL ERESOLVE unable to resolve dependency tree when building my docker container

╄→гoц情女王★ 提交于 2020-12-30 08:15:20
问题 Here are my files. Here is I think the core of the problem. Could not resolve dependency: npm ERR! peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-middleware@4.0.2 docker-compose.yml version: '3.7' services: apollo: container_name: apollo build: context: . dockerfile: Dockerfile environment: - NODE_ENV=development volumes: - '.:/app' - '/app/node_modules' ports: - 4000:4000 restart: always Dockerfile # Use the official image as a parent image. FROM node:current-slim # Set the

GraphQL ERESOLVE unable to resolve dependency tree when building my docker container

这一生的挚爱 提交于 2020-12-30 08:14:31
问题 Here are my files. Here is I think the core of the problem. Could not resolve dependency: npm ERR! peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-middleware@4.0.2 docker-compose.yml version: '3.7' services: apollo: container_name: apollo build: context: . dockerfile: Dockerfile environment: - NODE_ENV=development volumes: - '.:/app' - '/app/node_modules' ports: - 4000:4000 restart: always Dockerfile # Use the official image as a parent image. FROM node:current-slim # Set the

GraphQL ERESOLVE unable to resolve dependency tree when building my docker container

好久不见. 提交于 2020-12-30 08:13:25
问题 Here are my files. Here is I think the core of the problem. Could not resolve dependency: npm ERR! peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-middleware@4.0.2 docker-compose.yml version: '3.7' services: apollo: container_name: apollo build: context: . dockerfile: Dockerfile environment: - NODE_ENV=development volumes: - '.:/app' - '/app/node_modules' ports: - 4000:4000 restart: always Dockerfile # Use the official image as a parent image. FROM node:current-slim # Set the

GraphQL ERESOLVE unable to resolve dependency tree when building my docker container

北城以北 提交于 2020-12-30 08:13:15
问题 Here are my files. Here is I think the core of the problem. Could not resolve dependency: npm ERR! peer graphql@"^0.12.0 || ^0.13.0 || ^14.0.0" from graphql-middleware@4.0.2 docker-compose.yml version: '3.7' services: apollo: container_name: apollo build: context: . dockerfile: Dockerfile environment: - NODE_ENV=development volumes: - '.:/app' - '/app/node_modules' ports: - 4000:4000 restart: always Dockerfile # Use the official image as a parent image. FROM node:current-slim # Set the

How to view Docker image layers on Docker Hub?

大城市里の小女人 提交于 2020-12-30 05:33:04
问题 I know that I can use this command $ docker images --tree docker history to view the layers of a Docker image, but how do I do that for images on Docker Hub without pulling it? This is so that I know what is on an image before I download it. E.g., for the Tomcat repo, https://registry.hub.docker.com/_/tomcat/, the webpage doesn't seem to show what is on the image. I have to look at the Dockerfile on Github to find out. Update I see this repo https://registry.hub.docker.com/u/tutum/tomcat/ has

Docker distroless image how to add customize certificate to trust store?

限于喜欢 提交于 2020-12-29 16:44:26
问题 gcr.io/distroless/java How to add custom pki certificate? 回答1: The distroless images are based on Debian 9, so you can do a multi-stage build and do something like the following: FROM debian AS build-env # Add CA files ADD my-ca-file.crt /usr/local/share/ca-certificates/my-ca-file.crt RUN update-ca-certificates FROM gcr.io/distroless/base COPY --from=build-env /etc/ssl/certs /etc/ssl/certs 来源: https://stackoverflow.com/questions/52636213/docker-distroless-image-how-to-add-customize