./test.sh
./test.sh: line 1: $'\r': command not found
или./test.sh: /bin/sh^M: bad interpreter: No such file or directory
sed -i 's|\r||g' test.sh
version: "3.7"
services:
app:
image: "alpine:3.9.5"
command: "sh -c 'while true ; do sleep 1; done'"
volumes:
- .:/app
ports:
- "8585:8080"
$ docker-compose up
Recreating owner_app_1 ... done
Attaching to owner_app_1
docker-compose exec app sh
ls /app
AppData
Application Data
Contacts
Cookies
Desktop
Documents
Downloads
Favorites
Links
Local Settings
MicrosoftEdgeBackups
Music
My Documents
NTUSER.DAT
...
curl http://localhost:8585
stat *txt
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
version: "3.7"
services:
app:
image: docker-java/java
# NOTE: GID can be unset
# may use bash syntax to supply for defaut value
user: "${UID:-1000}:${GID:-1000}"
command: "java -jar /app/target/demo-2.7.5.jar"
volumes:
- .:/app
ports:
- "8585:8080"
environment:
UID: ${UID:-1000}
0GID: ${GID:-1000}
applicationMain.txt
controllerHello.txt
curl http://localhost:8585
stat *txt
access: (0644/-rw-r--r--) Uid: ( 1000/sergueik) Gid: ( 1000/sergueik)
Dockerfile.тосё
тосё_dockerfile