Skip to content

Commit

Permalink
It is appropriate to use COPY in this case.
Browse files Browse the repository at this point in the history
  • Loading branch information
bootjp committed Apr 10, 2021
1 parent 3fa91ba commit f7ad33a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/cc/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM gcc:6 AS build-env
ADD . /app
COPY . /app
WORKDIR /app
RUN cc hello.c -o hello

Expand Down
2 changes: 1 addition & 1 deletion examples/dotnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM microsoft/dotnet:2.0.0-sdk AS build-env
ADD . /app
COPY . /app
WORKDIR /app
RUN dotnet restore -r linux-x64
RUN dotnet publish -c Release -r linux-x64
Expand Down
2 changes: 1 addition & 1 deletion examples/go/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:1.12 as build-env

WORKDIR /go/src/app
ADD . /go/src/app
COPY . /go/src/app

RUN go get -d -v ./...

Expand Down
2 changes: 1 addition & 1 deletion examples/java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM openjdk:11-jdk-slim AS build-env
ADD . /app/examples
COPY . /app/examples
WORKDIR /app
RUN javac examples/*.java
RUN jar cfe main.jar examples.HelloJava examples/*.class
Expand Down
2 changes: 1 addition & 1 deletion examples/nodejs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM node:10 AS build-env
ADD . /app
COPY . /app
WORKDIR /app

RUN npm ci --only=production
Expand Down
2 changes: 1 addition & 1 deletion examples/python2.7/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:2.7-slim AS build-env
ADD . /app
COPY . /app
WORKDIR /app

FROM gcr.io/distroless/python2.7
Expand Down
2 changes: 1 addition & 1 deletion examples/python3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM python:3-slim AS build-env
ADD . /app
COPY . /app
WORKDIR /app

FROM gcr.io/distroless/python3
Expand Down
2 changes: 1 addition & 1 deletion examples/rust/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM rust:1.41.0 as build-env
WORKDIR /app
ADD . /app
COPY . /app
RUN cargo build --release

FROM gcr.io/distroless/cc
Expand Down

0 comments on commit f7ad33a

Please sign in to comment.