Dockerfile
FROM ubuntu:18.04
WORKDIR /asm
RUN apt-get update
RUN apt-get install nasm
RUN apt-get install binutils
COPY ./asm/. .
RUN nasm -f elf64 main.asm
RUN ld main.o -o main
CMD ["./main"]
./asm/main.asm
global _start
section .data
hello: db "Hello World", 0x0a
hellolen: equ $ - hello
section .text
_start:
mov eax, 4
mov ebx, 1
mov ecx, hello
mov edx, hellolen
int 0x80
mov eax, 1
mov ebx, 0
int 0x80