executable not found on docker container - docker

I'm having some issue trying to run a CMD command inside a docker container with a Go application.
This is the output I've got:
golang-api | /bin/sh: ./server: not found
golang-api exited with code 127
This is the Dockerfile
FROM golang:1.18-alpine
RUN apk add g++ && apk add make
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make build
EXPOSE 8000
CMD ./server
And this is the Makefile responsible for the build command:
LINUX_AMD64 = GOOS=linux GOARCH=amd64 CGO_ENABLED=1 GO111MODULE=on
migrate:
cd cmd/migrations/$(FOLDER) && go run main.go
build:
cd cmd && $(LINUX_AMD64) go build -a -v -tags musl -o server
And the docker-compose.yml
version: '3.1'
services:
api:
build:
dockerfile: Dockerfile
context: .
container_name: golang-api
ports:
- "8000:8000"
restart: unless-stopped
depends_on:
- db
environment:
- POSTGRES_URL=$POSTGRES_URL
db:
image: postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- '5432:5432'
Complete output:
Building api
Sending build context to Docker daemon 74.24kB
Step 1/9 : FROM golang:1.18-alpine
---> 6078a5fce1f5
Step 2/9 : RUN apk add g++ && apk add make
---> Using cache
---> 2a85b9182b80
Step 3/9 : WORKDIR /app
---> Using cache
---> baf1e6b7047c
Step 4/9 : COPY go.mod go.sum ./
---> Using cache
---> 1f2d031bc1b0
Step 5/9 : RUN go mod download
---> Using cache
---> 471d6f24e6a9
Step 6/9 : COPY . .
---> eaa86ff7cb1b
Step 7/9 : RUN make build
---> Running in d6ae6ce79222
cd cmd && GOOS=linux GOARCH=amd64 CGO_ENABLED=1 GO111MODULE=on go build -a -v -tags musl -o server
internal/goos
internal/goarch
internal/race
internal/unsafeheader
internal/goexperiment
runtime/internal/syscall
internal/cpu
sync/atomic
runtime/internal/atomic
internal/itoa
math/bits
internal/abi
runtime/internal/math
runtime/internal/sys
unicode/utf8
unicode
container/list
crypto/internal/subtle
crypto/subtle
unicode/utf16
vendor/golang.org/x/crypto/cryptobyte/asn1
internal/nettrace
vendor/golang.org/x/crypto/internal/subtle
encoding
github.com/mymachine/my-api/internal/controllers/dto
github.com/mymachine/my-api/internal/controllers/helpers
internal/bytealg
math
runtime
internal/reflectlite
sync
internal/testlog
internal/singleflight
math/rand
runtime/cgo
errors
sort
internal/oserror
strconv
path
vendor/golang.org/x/net/dns/dnsmessage
io
crypto/elliptic/internal/fiat
syscall
golang.org/x/text/internal/tag
hash
bytes
strings
hash/crc32
reflect
crypto
crypto/internal/randutil
crypto/hmac
crypto/rc4
net/http/internal/ascii
vendor/golang.org/x/crypto/hkdf
regexp/syntax
github.com/jackc/chunkreader/v2
bufio
crypto/elliptic/internal/nistec
internal/syscall/unix
time
internal/syscall/execenv
vendor/golang.org/x/text/transform
golang.org/x/crypto/pbkdf2
golang.org/x/text/transform
golang.org/x/text/runes
golang.org/x/text/width
regexp
internal/poll
io/fs
context
github.com/mymachine/my-api/internal/entities
github.com/jackc/pgconn/internal/ctxwatch
embed
os
github.com/jinzhu/inflection
github.com/jinzhu/now
internal/fmtsort
encoding/binary
crypto/ed25519/internal/edwards25519/field
crypto/md5
crypto/sha512
crypto/cipher
crypto/sha256
crypto/sha1
encoding/base64
fmt
internal/godebug
encoding/pem
crypto/ed25519/internal/edwards25519
path/filepath
vendor/golang.org/x/crypto/internal/poly1305
io/ioutil
internal/intern
vendor/golang.org/x/crypto/curve25519/internal/field
vendor/golang.org/x/sys/cpu
net/netip
crypto/aes
crypto/des
vendor/golang.org/x/crypto/chacha20
github.com/jackc/pgio
github.com/jackc/pgpassfile
os/exec
os/signal
net
vendor/golang.org/x/crypto/chacha20poly1305
math/big
encoding/hex
net/url
compress/flate
vendor/golang.org/x/crypto/curve25519
log
vendor/golang.org/x/text/unicode/norm
vendor/golang.org/x/text/unicode/bidi
vendor/golang.org/x/net/http2/hpack
mime
mime/quotedprintable
compress/gzip
net/http/internal
database/sql/driver
github.com/mymachine/my-api/internal/pkg/errors
encoding/json
github.com/jackc/pgservicefile
vendor/golang.org/x/text/secure/bidirule
golang.org/x/text/internal/language
database/sql
golang.org/x/text/unicode/norm
golang.org/x/text/unicode/bidi
vendor/golang.org/x/net/idna
os/user
crypto/rand
encoding/asn1
crypto/dsa
crypto/elliptic
crypto/ed25519
crypto/rsa
github.com/jackc/pgproto3/v2
golang.org/x/text/internal/language/compact
golang.org/x/text/secure/bidirule
github.com/jackc/pgx/v4/internal/sanitize
golang.org/x/text/language
go/token
vendor/golang.org/x/crypto/cryptobyte
crypto/x509/pkix
gorm.io/gorm/utils
gorm.io/gorm/logger
encoding/gob
go/scanner
golang.org/x/text/internal
github.com/joho/godotenv
crypto/ecdsa
go/ast
golang.org/x/text/cases
github.com/joho/godotenv/autoload
golang.org/x/text/secure/precis
gorm.io/gorm/clause
gorm.io/gorm/schema
gorm.io/gorm
net/textproto
vendor/golang.org/x/net/http/httpproxy
github.com/google/uuid
crypto/x509
github.com/jackc/pgtype
mime/multipart
vendor/golang.org/x/net/http/httpguts
crypto/tls
gorm.io/gorm/migrator
gorm.io/gorm/callbacks
net/http/httptrace
github.com/jackc/pgconn
net/http
github.com/jackc/pgconn/stmtcache
github.com/jackc/pgx/v4
github.com/jackc/pgx/v4/stdlib
gorm.io/driver/postgres
github.com/mymachine/my-api/internal/infrastructure/repository
github.com/mymachine/my-api/configs
github.com/mymachine/my-api/internal/services
github.com/mymachine/my-api/internal/services/transaction
github.com/mymachine/my-api/internal/controllers/handlers/health
github.com/gorilla/mux
github.com/mymachine/my-api/internal/controllers/handlers/transaction
github.com/mymachine/my-api/internal/router
github.com/mymachine/my-api/cmd
Removing intermediate container d6ae6ce79222
---> 621aa6a266de
Step 8/9 : EXPOSE 8000
---> Running in 3cbd17d32c37
Removing intermediate container 3cbd17d32c37
---> 754f71a7753e
Step 9/9 : CMD ./server
---> Running in dfcdc8cd45ce
Removing intermediate container dfcdc8cd45ce
---> 511dbf89a001
Successfully built 511dbf89a001
Successfully tagged my-api_api:latest
Creating my-api_db_1 ... done
Creating golang-api ... done
Attaching to my-api_db_1, golang-api
golang-api | /bin/sh: ./server: not found

The problem was solved.
Somehow,the RUN cd cmd command seemed not generating the file in the expected directory.
Trying with RUN go build cmd/main.go instead of using the makefile worked, as well pointed by #paltaa in the comments.

Related

Docker Service failed to build: pull access denied, repository does not exist or may require 'docker login'

I have a project that contains a Dockerfile and a docker-compose.yml.
Dockerfile:
FROM mhart/alpine-node:11 AS builder
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn build
WORKDIR /app
COPY --from=builder /app/build .
CMD ["serve", "-p", "80", "-s", "."]
docker-compose.yml:
version: "3"
services:
front:
build: .
ports:
- 8080:80
restart: always
When I try to run it like below.
docker-compose up -d
I get the following message:
Building front
Step 1/8 : FROM mhart/alpine-node:11 AS builder
---> 5ff13b69f215
Step 2/8 : WORKDIR /app
---> Using cache
---> 1da7c0d4dfac
Step 3/8 : COPY . .
---> Using cache
---> 8d82bb9c0ecf
Step 4/8 : RUN yarn install
---> Using cache
---> 1e557a2dbe03
Step 5/8 : RUN yarn build
---> Using cache
---> ea2d3f56ff39
Step 6/8 : WORKDIR /app
---> Using cache
---> 1edb82c45c49
Step 7/8 : COPY --from=builder /app/build .
ERROR: Service 'front' failed to build: invalid from flag value builder: pull access denied for builder, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
I saw another question on Stackoverflow, I think it may be close to my problem.
invalid from flag value build: pull access denied for build, repository does not exist or may require 'docker login'
But I only have a build stage, not two stage like in the question from the link.
Your docker build is failing because you are missing a FROM command for your runtime environment. This appears to be a multi-stage docker build, and you are attempting to copy files from a previous build stage named builder but you are still in the first (and only) stage of your build (which is called builder).
You have two options. Either one should work.
Introduce a second runtime stage to your build:
Add another FROM command with the image that you want as your runtime. I just used mhart/alpine-node:11 again here but you may want a different runtime environment.
FROM mhart/alpine-node:11 AS builder
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn build
FROM mhart/alpine-node:11 AS runtime
RUN yarn global add serve
WORKDIR /app
COPY --from=builder /app/build .
CMD ["serve", "-p", "80", "-s", "."]
Make it a non multi-stage build:
Just remove the COPY command and change your workdir to the build directory:
FROM mhart/alpine-node:11 AS builder
RUN yarn global add serve
WORKDIR /app
COPY . .
RUN yarn install
RUN yarn build
WORKDIR /app/build
CMD ["serve", "-p", "80", "-s", "."]

docker-compose.yml with entrypoint. file not found

Tried a lot already, but doesn't want to run docker-compose with entrypoint...
I'm new to docker and trying to figure it out, but I can't seem to run the program through entrypoint.sh
Dockerfile
FROM python:3.7-alpine
WORKDIR /app
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
RUN /usr/local/bin/python3 -m pip install --upgrade pip
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
COPY /web .
COPY entrypoint.sh entrypoint.sh
RUN chmod u+x ./entrypoint.sh
docker-compose.yml
version: "3.9"
services:
web:
build: .
ports:
- "5000:5000"
volumes:
- ./web:/app
environment:
PG_HOST: pg
PG_USER: ${POSTGRES_USER}
PG_PASSWORD: ${POSTGRES_PASSWORD}
PG_DB: ${POSTGRES_DB}
depends_on:
- pg
entrypoint: entrypoint.sh
pg:
image: "postgres:alpine"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
# PGDATA: /var/lib/postgresql/data/pgdata
# volumes:
# - ./data/pgdata:/var/lib/postgresql/data/pgdata
ports:
- 5432:5432
entrypoint.sh
#python3 manage.py db upgrade
flask run --host=0.0.0.0
ERROR:
Step 1/11 : FROM python:3.7-alpine
---> c051b8594107
Step 2/11 : WORKDIR /app
---> Using cache
---> d19c508ff35c
Step 3/11 : RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev
---> Using cache
---> 19b5e197621a
Step 4/11 : ENV FLASK_APP=app.py
---> Using cache
---> af02528555c4
Step 5/11 : ENV FLASK_RUN_HOST=0.0.0.0
---> Using cache
---> 4029b777d985
Step 6/11 : RUN /usr/local/bin/python3 -m pip install --upgrade pip
---> Using cache
---> e94f1f70106b
Step 7/11 : COPY requirements.txt requirements.txt
---> Using cache
---> fb4ad7239fa2
Step 8/11 : RUN pip install -r requirements.txt
---> Using cache
---> 1f912edd8219
Step 9/11 : COPY /web .
---> Using cache
---> 32966afa52ee
Step 10/11 : COPY entrypoint.sh entrypoint.sh
---> Using cache
---> 11525954905f
Step 11/11 : RUN chmod u+x ./entrypoint.sh
---> Using cache
---> 575c41093e1f
...
Successfully built 89b11d4d5f71
Successfully tagged rodauth_web:latest
rodauth_pg_1 is up-to-date
Recreating 1e4f3f2f6898_rodauth_web_1 ...
Recreating 1e4f3f2f6898_rodauth_web_1 ... error
ERROR: for 1e4f3f2f6898_rodauth_web_1 Cannot start service web: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "entrypoint.sh": executable file not found in $PATH: unknown
ERROR: for web Cannot start service web: OCI runtime create failed: container_linux.go:370: starting container process caused: exec: "entrypoint.sh": executable file not found in $PATH: unknown
Encountered errors while bringing up the project.
tried adding command RUN chmod u+x ./entrypoint.sh but
the problem is not gone.
Added the build log for COPY entrypoint.sh entrypoint.sh part.
Your entrypoint.sh file get removed from the container when you mount ./web to /app folder as a volume in docker-compose file. so copy entrypoint to root
COPY entrypoint.sh /entrypoint.sh
RUN chmod u+x /entrypoint.sh
And set entrypoint in docker-compose as
entrypoint: /entrypoint.sh
instead of COPY /web ., just do COPY . /app where you are copying the same structure into /app. as you mentioned, workdir /app you are already in that app folder.
or you can just change the last line, COPY entrypoint.sh .
simple docker example : https://github.com/cerofrais/baiscs/tree/master/basic_docker
First, if you want the script to be the normal entrypoint for the image, I'd move that into the Dockerfile with the following:
ENTRYPOINT ["./entrypoint.sh"]
As for why you'd see a file not found error on a script, several potential reasons:
The first line, e.g. #!/bin/bash, points to a command that does not exist in the image you are using. You need to update your script to use the right shell, or change base images to one that includes your shell.
The script is formatted with Windows linefeeds that include a CR before the LF. That turns /bin/sh into /bin/sh^M (sometimes shown as /bin/sh\r) which doesn't exist in the filesystem. This can be fixed by changing the line feed format in your editor, fixing Git to change how linefeeds are automatically changed, or using a tool like dos2unix.
If you run an image for a different platform, and have qemu binfmt_misc installed but without the --fix-binary option, it will look for the interpreter for your platform inside the image rather that from the host. Often this can be fixed with a newer version of binfmt_misc.
The exec format error mentioned in the comments indicates you are running an image designed for another platform on your host. Docker will attempt to pull the proper platform if you have a multi-platform image. However if the image is only built for one platform, and you try to run it on a different platform without something like qemu's binfmt_misc properly configured, you'll get errors. And the fix for that is to change base images to one that supports that CPU architecture and binary format where you are running the image.
This is how I customized Ravisha Hesh's answer and it worked for me.
COPY entrypoint.sh /entrypoint.sh
RUN chmod u+x /entrypoint.sh
CMD ["/entrypoint.sh"]

Dockerfile MKDIR not working (node:alpine)

I am getting error when trying to create /app directory using the files below. This has worked for me in the past so I am not sure what is going wrong now:
Step 1/8 : FROM node:alpine
---> 0d8a3475dbc3
Step 2/8 : RUN MKDIR -p "/app"
---> Running in ad24819ce982
/bin/sh: MKDIR: not found
ERROR: Service 'add_delete_server' failed to build: The command '/bin/sh -c MKDIR -p "/app"' returned a non-zero code: 127
Docker compose :
version: "3.8"
services:
add_delete_server:
build:
context: ./AddDeleteServer
dockerfile: Dockerfile.dev
ports:
- "3001:3001"
volumes:
- /app/node_modules
- ./server:/app
Dockerfile.dev
FROM node:alpine
#setting work directory
RUN MKDIR -p "/app"
WORKDIR "/app"
#copying only package.json first, so cache can be used for minor changes
COPY package.json .
COPY package-lock.json .
RUN npm install
# copy rest of files
COPY . .
CMD ["npm", "run","dev"]
But I am not able to generate
MKDIR is not a command ,mkdir is the command

Failing to build docker container on remote host

I have a set of docker containers that are generated from yml files and work ok.
I now want to deploy them to another machine. In another post here I was advised to build the container on the remote host using one of 2 options:
option1 - copy the code to the remote host and apply a modified docker-compose, and build from source using a modified docker-compose
option2 - create an image on local machine, push it to a docker repository, pull it from there, using a modified docker-compose
I'm trying to follow option1 (as a start). I copied the code into the remote host, and modified the Dockerfile, and docker-compose.yml files (snippet1)
The build goes partway through. It downloads the python and postgres images, and starts to process the Dockerfile, but it fails to install the requirements (it fails to install the first requirement - see snippet2)
What can be the problem?
snippet1 - Dockerfile.dair, and docker-compose.yml
cat /home/ubuntu/webServer/web/Dockerfile.dair
FROM python:3.6.1
MAINTAINER User4 <user4#gmail.com>
# Create the group and user to be used in this container
RUN groupadd flaskgroup && useradd -m -g flaskgroup -s /bin/bash flask
# Create the working directory (and set it as the working directory)
RUN mkdir -p /home/flask/app/web
WORKDIR /home/flask/app/web
# Install the package dependencies (this step is separated
# from copying all the source code to avoid having to
# re-install all python packages defined in requirements2.txt
# whenever any source code change is made)
COPY requirements2.txt /home/flask/app/web
RUN pip install --no-cache-dir -r requirements2.txt
# Copy the source code into the container
COPY . /home/flask/app/web
RUN chown -R flask:flaskgroup /home/flask
USER flask
EXPOSE 8000
CMD /usr/local/bin/gunicorn -w 2 -t 3600 -b :8000 project:app
ENV PYTHONUNBUFFERED=1
ENV FLASK_APP=run.py
ENV FLASK_DEBUG=1
,
cat /home/ubuntu/construction_overlay/webServer/docker-compose.dair.yml
version: '3'
services:
web:
restart: always
build:
context: ./web
dockerfile: Dockerfile.dair
volumes:
- /home/ubuntu/construction_overlay/webServer/web:/home/flask/app/web
depends_on:
- postgres
nginx:
restart: always
build: ./nginx
ports:
- "80:80"
volumes:
- /home/ubuntu/construction_overlay/webServer/web:/home/flask/app/web
depends_on:
- web
postgres:
restart: always
build: ./postgresql
volumes:
- data1:/var/lib/postgresql
expose:
- "5432"
volumes:
data1:
snippet2 - the build fails to install the requirements
cat /home/ubuntu/webServer/web/requirements.txt
alembic==0.8.8
atomicwrites==1.3.0
attrs==19.1.0
...
,
docker-compose -f /home/ubuntu/webServer/docker-compose.dair.yml up --build -d;
Building postgres
Step 1/4 : FROM postgres:11.3
---> 4e045cb8eecd
Step 2/4 : ENV POSTGRES_USER postgres_user
---> Using cache
---> 400023c58607
Step 3/4 : ENV POSTGRES_PASSWORD postgres_user
---> Using cache
---> 0cf91f314380
Step 4/4 : ENV POSTGRES_DB construction-overlay-db
---> Using cache
---> 151106ecf13b
Successfully built 151106ecf13b
Successfully tagged webserver_postgres:latest
Building web
Step 1/10 : FROM python:3.6.1
---> 955d0c3b1bb2
Step 2/10 : MAINTAINER User4 <user4#gmail.com>
---> Using cache
---> 128d55ddb4e7
Step 3/10 : RUN groupadd flaskgroup && useradd -m -g flaskgroup -s /bin/bash flask
---> Using cache
---> e2c30915fcf5
Step 4/10 : RUN mkdir -p /home/flask/app/web
---> Using cache
---> 8f44dada5953
Step 5/10 : WORKDIR /home/flask/app/web
---> Using cache
---> 04a895c3fe27
Step 6/10 : COPY requirements.txt /home/flask/app/web
---> Using cache
---> 13ab37e789f8
Step 7/10 : RUN pip install --no-cache-dir -r requirements.txt
---> Running in 61475950cd73
Collecting alembic==0.8.8 (from -r requirements.txt (line 1))
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f1e979262b0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/alembic/
The solution was to add a rule for UDP outbound at the cloud provider
After adding this rule, the pre-requirements install ok
Egress IPv4 UDP 1 - 65535 0.0.0.0/0

COPY command fails

Been stuck on this for the last 3 days. I'm building an image in a docker and
copy command fails due to not finding the right directory.
FROM python:3.6.7-alpine
WORKDIR /usr/src/app
COPY ./requirements.txt /usr/src/app/requirements.txt
RUN pip3 install -r requirements.txt
COPY . /usr/src/app
CMD python3 manage.py run -h 0.0.0.0
which is run by this docker-dev file:
version: '3.7'
services:
users:
build:
context: ./services/users
dockerfile: Dockerfile-dev
volumes:
- './services/users:/usr/src/app'
ports:
- 5001:5000
environment:
- FLASK_APP=project/__init__.py
- FLASK_ENV=development
and getting this error:
Building users
Step 1/6 : FROM python:3.6.7-alpine
---> cb04a359db13
Step 2/6 : WORKDIR /usr/src/app
---> Using cache
---> 06bb39a49444
Step 3/6 : COPY ./requirements.txt /usr/src/app/requirements.txt
ERROR: Service 'users' failed to build: COPY failed: stat /var/snap/docker/common/var-lib-docker/tmp/docker-builder353668631/requirements.txt: no such file or directory
I don't even know where to start with debugging this. When I tried to access the directory it gave me permission error. So I tried to run the command with sudo which didn't help. Any thoughts ?
Little late to reply, but second COPY command COPY . /usr/src/app replaces the /usr/src/app content generated by RUN pip3 install -r requirements.txt.
Try
FROM python:3.6.7-alpine
WORKDIR /usr/src/app
# install in temp directory
RUN mkdir /dependencies
COPY ./requirements.txt /dependencies/requirements.txt
RUN cd /dependencies && pip3 install -r requirements.txt
COPY . /usr/src/app
# copy generated dependencies
RUN cp -r /dependencies/* /usr/src/app/
CMD python3 manage.py run -h 0.0.0.0
As larsks suggests in his comment, you need the file in the services/users directory. To understand why, an understanding of the "context" is useful.
Docker does not build on the client, it does not see your current directory, or other files on your filesystem. Instead, the last argument to the build command is passed as the build context. With docker-compose, this context defaults to the current directory, which you will often see as . in a docker build command, but you can override that as you've done here with ./services/users as your context. When you run a build, the very first step is to send that build context from the docker client to the server. Even when the client and server are on the same host (a common default, especially for desktop environments), this same process happens. Files listed in .dockerignore, and files in parent directories to the build context are not sent to the docker server.
When you run a COPY or ADD command, the first argument (or all but the last argument when you have multiple) refer to files from the build context, and the last argument is the destination file or directory inside the image.
Therefore, when you put together this compose file entry:
build:
context: ./services/users
dockerfile: Dockerfile-dev
with this COPY command:
COPY ./requirements.txt /usr/src/app/requirements.txt
the COPY will try to copy the requirements.txt file from the build context generated from ./services/users, meaning ./services/users/requirements.txt needs to exist, and not be excluded by a .dockerignore file in ./services/users.
I had a similar problem building an image with beryllium, and I solved this deleting it into the .dockerignore
$ sudo docker build -t apache .
Sending build context to Docker daemon
10.55MB Step 1/4 : FROM centos ---> 9f38484d220f Step 2/4 :
RUN yum install httpd -y
---> Using cache ---> ccdafc4ae476 Step 3/4 :
**COPY ./**beryllium** /var/www/html COPY failed: stat /var/snap/docker/common/var-lib-docker/tmp/docker-builder04301**
$nano .dockerignore
startbootstrap-freelancer-master
run.sh
pro
fruit
beryllium
Bell.zip
remove beryllium from that file
$ sudo docker build -t apache .
Sending build context to Docker daemon 12.92MB
Step 1/4 : FROM centos
---> 9f38484d220f
Step 2/4 : RUN yum install httpd -y
---> Using cache
---> ccdafc4ae476
Step 3/4 : COPY ./beryllium /var/www/HTML
---> 40ebc02992a9
Step 4/4 : CMD apachectl -DFOREGROUND
---> Running in dab0a406c89e
Removing intermediate container dab0a406c89e
---> 1bea741cfb65
Successfully built 1bea741cfb65
Successfully tagged apache:latest

Resources